How to set up an API List
An API List is list of subscribers that is generated by an endpoint you provide to CME. You can specify a refresh interval for an API List, which will make CME hit your endpoint frequently to pull in new subscribers incrementally.
Your API must meet the following requirements to work with CME
- Support POST - This is because the CME client will send a post request to your endpoint
- Support 2 parameters named: last_id and limit
- Response must be JSON with this structure
Sample response from your endpoint
IMPORTANT: Each subscriber must have an email attributes else CME will fail to process your list.
{
"list": [
{"email" : "abc@example.com", "attributen" : "valuen", ...},
{"email" : "def@example.com", "attributen" : "valuen", ...},
],
"last_id": 2
}
- list - is an array of your subscribers with as many attributes as you want.
- last_id - this is the last id in each batch of subscribers you return in each request. In the example above, we assume our id starts from 1 so the last id will be 2. This allows CME to perform incremental refreshes. By specifying the last_id when making a request to your API, CME is able to retrieve users from a given point.