Skip to main content

Creating Content APIs in MoEngage

To integrate Talon.One with MoEngage, you can create a Content API in MoEngage for each of the following supported generic CEP integration endpoints:

Creating an API key in Talon.One

Generate a Talon.One API key of the type Customer Engagement that you can use with MoEngage.

To generate a third-party API key:

  1. In your Application, click Settings > Integration API Keys.

  2. Click Create API Key.

  3. In the Create API Key drawer, select Production as the key type.

  4. In Key name, type a name to identify the key.

  5. In Key expiration date, select a date.

  6. In Third-party integration, select Yes.

  7. From Platform, select Customer Engagement.

  8. Click Create API Key.

  9. Click to copy the key for use.

    note

    You cannot view or copy the API key after closing the drawer. If you lose it, create another API key.

Use the key in the Authorization header of each of the endpoints. For example:

Authorization: ApiKey-v1 dbc644d33aa74d582bd9479c59e16f970fe13bf3

Creating Content APIs in MoEngage

In MoEngage, based on the Talon.One content you want to use in your campaign, create a Content API for each of the supported endpoints.

To create a Content API in MoEngage:

  1. On the MoEngage dashboard, click Settings > APIs > Content API.
  2. Click Add.
  3. In the Add Content API window, enter the required endpoint parameters and headers.
  4. Click Save.

The endpoint is saved under Content API.

Using Content APIs in MoEngage campaigns

You can now use the Content API that you created for a supported Talon.One endpoint in your MoEngage campaigns.

Usage example

You can use the Content API, for example, to display a generated coupon code in an email template of your email campaign. A sample syntax to do this is:

{% set couponAPI = ContentApi.Create_coupon({({“params”:{},“static_params”:{},“dynamic_params”:{},“request_body”:{}})}) %}
{% for coupon in couponAPI.Value %} {{coupon}} {% endfor %}

To learn how to use Content APIs in MoEngage, see the MoEngage documentation:

Supported endpoints

Based on the content needs of your MoEngage campaign, you can use the following supported generic CEP integration endpoints:

Create coupon

GET Create coupon
https://integration.talon.one/customer_engagement/coupon

See API Docs

note

You can modify the format of Talon.One-generated coupon codes for any campaign:

  1. Open your campaign.
  2. Click Settings > Coupon codes.

Create referral

GET Create referral
https://integration.talon.one/customer_engagement/referral

See API Docs

Fetch loyalty ledger

GET Get loyalty ledger
https://integration.talon.one/customer_engagement/loyalty

See API Docs