Webhook Configuration
It's vital to configure webhooks to ensure your app can receive real-time updates from the Symphony Ads API.
You can easily self-configure the webhook events that are called, and to which URL. Symphony's API will send POST requests to your endpoint with the payload structure outlined in this documentation.
Steps to Configure:
Make the following call to the Sandbox or Production API, along with your
curl -X POST {{PARTNER_API}}/webhook \
-H "Content-Type: application/json" \
-H "x-api-key: your-api-key-here" \
-d '{
"url": "https://webhook.site/64ea010c-81e3-4df4-9844-49ec8704ad18/update",
"events": [
"campaign.created",
"campaign.updated",
"campaign.processing",
"campaign.completed",
"campaign.failed"
]
}'Your payload should include these body params:
url: your url where you want to receive the webhookevents: Array of event types you want to subscribe to. You can pass every event type if you want a single endpoint to receive all webhooks, or configure multiple URLs for specific event types.
{
"url": "https://webhook.site/64ea010c-81e3-4df4-9844-49ec8704ad18/update",
"events": [
"campaign.updated"
]
}Once you have a webhook configured, execute one of the corresponding flow and wait to receive the updates.
Event types
Webhooks are sent with an event field, which defines the type of action or change made for an entity. The following events are called:
campaign.createdcampaign.updatedcampaign.failedcampaign.processingcampaign.completed
Requests
Each of these states sends a request with the POST method to the configured url.
In the body of the request, send:
event: the type of action or change made (ex:campaign.created)- The information of the entity that changed is also sent in the root of the payload. For example, for status changes of a campaign, the following is sent:
provider: facebook or symphony, depending on the type of campaign that was configuredtype: Depending on the provider it could be:- facebook:
*'boost_instagram'*|*'record_streams'*|*'link_clicks'* - symphony:
*get_playlisted|increase_video_views*
- facebook:
id: Campaign identifierreason: In case a state can change for more than one reason, this is specified in the reason field, for example, when a campaign updates the end date, theeventfield will becampaign.updated, and the reasonend_date_changedmetadata: Object with relevant information, comes incampaign.updatedeventsstatus: The possible status of the campaign, although they are generally according to theeventfield- Possible statuses
| 'DRAFT' | 'PROCESSING' | 'SUCCESS' | 'FAILED' | 'TO_RETRY' | 'PAUSED' | 'FINISHED' | 'ACTIVE' | 'ANTICIPATED_PAUSE' | 'IN_REVIEW'
Updated about 2 months ago
