Content API

Content API feature enables you to configure your API end points in Connect and use it to fetch any data and use it in your campaigns.

To add a content API, go to Profile (top right corner) -> Settings -> Content API.

How to add and test a Content API

1Click ‘+Content API’ to add a new content API.
2In the popup, enter a API name and add API cuRL request with placeholders (if any) and click Validate.
3If there any placeholders present in the API Request, then its recommended to add a description for the same.This will help your marketing/product teams to use these parameters properly in campaign. Click Continue.
4Add the cURL request with sample values to test the API. Click ‘Test CURL’
5You will see API response with Status, Response Size and Response Time.
6Select the response fields you want to use it in your campaign.
7By default, all the selected response fields will have a mapper variable. This is to make sure complex nested API responses are handled. You can change the mapper variable names as per your requirement.
8Click ‘Save Configuration’ and you will see it in the Content API listing page.
If the response time is between 100 and 500 ms, we show it as ‘Slightly High’ and >500 ms is VERY HIGH. Its recommended to have response time less than 100ms.

How to use Content API in Campaigns

Once you have added and tested a Content API, you can use it to fetch data and use the response data in any campaigns.

1While creating a campaign, you will see an option to select Content APIs
2You can select the Content API(s) from dropdown.
3If the selected Content API has any input parameters, you can assign it from the cohort data.
4Click ‘Go to Testing’ to test the campaign.
Order matters: When using multiple Content APIs, arrange them sequentially if you plan to pass the response from one API as input to the next.