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 3rd-party API key

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

To generate a 3rd-party API key:

  1. In your Talon.One Application, click Settings > Developer settings.

  2. Click Create API Key.

  3. For Do you want to use this API Key with a 3rd party service?, select Yes.

  4. From Platform, select Customer Engagement.

  5. Select an expiration date, and click Create API Key.

  6. Copy the key for later use.

    note

    You cannot display the API key after this step. If you lose the value, create a new 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