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:

Setting up the integration

1

Create an API key in Talon.One

In the Campaign Manager, create an API key of type Customer Engagement Platform, which you can use with MoEngage:

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

  2. Click Create API Key.

  3. In the Create API Key drawer, if you are asked for a key type, select Production.

  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 Platform.

  8. Click Create API Key.

  9. Click to copy the key for use.

  10. 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
2

Create 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.

3

Use the Content APIs

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

For example, to display a generated coupon code in an email template of your email campaign, use the following code:

{% 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

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