curl "https://app.tatango.com/api/v2/lists/ID/webhooks" -d '{"webhook":{"url":"https://example.com/webhook","event":"delivery_status"}}' -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-u [email protected]:my_api_key \
-H "Host: example.org" \
-H "Cookie: "{
"status": "Webhook created",
"webhook": {
"callback_url": "http://localhost.dev/null?api_key=foo_bar_baz",
"created_at": "2016-09-07T14:11:13-07:00",
"enabled": true,
"id": 4,
"list_id": 29,
"message_sent": false,
"subscribe": true,
"unsubscribe": true,
"updated_at": "2016-09-07T14:11:13-07:00"
}
}This endpoint creates a webhook for a list
curl "https://app.tatango.com/api/v2/lists/ID/webhooks" -d '{"webhook":{"url":"https://example.com/webhook","event":"delivery_status"}}' -X POST \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-u [email protected]:my_api_key \
-H "Host: example.org" \
-H "Cookie: "{
"status": "Webhook created",
"webhook": {
"callback_url": "http://localhost.dev/null?api_key=foo_bar_baz",
"created_at": "2016-09-07T14:11:13-07:00",
"enabled": true,
"id": 4,
"list_id": 29,
"message_sent": false,
"subscribe": true,
"unsubscribe": true,
"updated_at": "2016-09-07T14:11:13-07:00"
}
}POST https://app.tatango.com/api/v2/lists/{ID}/webhooks
Tatango authenticates API requests by validating an API key passed via HTTP Basic Authentication. Use your login email as the username and your API key as the password.
The ID of the list
Show child attributes
The URL to receive webhook events. Must be a valid HTTP or HTTPS endpoint.
"http://localhost.dev/null?api_key=foo_bar_baz"
Whether to receive subscription events (e.g., when a user subscribes).
true
Whether to receive unsubscription events.
true
Whether to receive events when a message is sent.
false
Webhook created successfully
"Webhook created"
Show child attributes
"http://localhost.dev/null?api_key=foo_bar_baz"
"2016-09-07T14:11:13-07:00"
true
4
29
false
true
true
"2016-09-07T14:11:13-07:00"
Was this page helpful?