- APIs provide a faster, non UI dependent way to deploy a campaign.
- APIs are more developer centric and campaign creation via APIs can be more versatile than normal campaign creation using UI.
- Using the UI, the users can use only the events captured by the SDK, but via an API the user can trigger a campaign via any event, whether it is an internal system event or an event captured by the SDK.
Campaign creation using API is divided into two parts:
- Campaign Creation
- Campaign Execution
- The campaign creation API allows the user to create a campaign but doesn't launch it.
- Here the user defines all the details of the campaign such as Campaign Name, App Id, Tags, type of campaign, template ID, etc(complete details in individual campaign API documentation).
- On successfully calling this API, you will get an HTTP 200 response with the ID of the campaign created.
- This Campaign ID will be required to call the campaign execution API.
- The created campaign will reside in the database till a corresponding campaign execution API is called.
Users will have to create the Templates from the Smartech UI. The IDs of these templates can only then be used in the campaign creation API.
- Campaign Execution API is actually the API which is responsible for sending out the campaign out to the users.
- The most important elements of the campaign API are the Campaign ID and the audience on which the campaign is to be deployed, along with the whether frequency capping is on and personalization data in key value pairs.
- On successful call of this API, you will receive a HTTP 200 response and the campaign will be deployed on all the users data source as specified in the API.
Updated 12 days ago