Create New Broadcast Campaign Webhook

Ashley Parks -

POST /api/v2/lists/:list_id/webhooks

Parameters

NameDescription
webhook[callback_url] Callback URL
webhook[subscribe] Should notify 'subscribe' events?
webhook[unsubscribe] Should notify 'unsubscribe' events?
webhook[message_sent] Should notify 'message_sent' events?

Request

Headers

Accept: application/json
Content-Type: application/json
Authorization: Basic dGF0YW5nbzp0YXRhbmdvX2tleV9veHkxaERscGZpRTZDWWtua2d0MGtn

Host: example.org
Cookie: 

Route

POST /api/v2/lists/1/webhooks

Body

{"webhook":{"callback_url":"http://localhost.dev/null?api_key=foo_bar_baz","subscribe":true,"unsubscribe":true,"message_sent":false}}

cURL

curl "https://app.tatango.com/api/v2/lists/1/webhooks" -d '{"webhook":{"callback_url":"http://localhost.dev/null?api_key=foo_bar_baz","subscribe":true,"unsubscribe":true,"message_sent":false}}' -X POST \
	-H "Accept: application/json" \
	-H "Content-Type: application/json" \
	-u tatango:tatango_key_oxy1hDlpfiE6CYknkgt0kg \
	-H "Host: example.org" \
	-H "Cookie: "

Response

Headers

Content-Type: application/json; charset=utf-8
X-Meta-Request-Version: 0.2.6
Content-Security-Policy: default-src https: 'self'; connect-src http: https: 'self' wss://*.intercom.io; img-src https: 'self'; script-src 'self' *.intercom.io *.intercomcdn.com 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; report-uri /uri-directive
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: SAMEORIGIN
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
X-UA-Compatible: IE=Edge,chrome=1
ETag: "33a054127742a5425995a91f8fd807bf"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 189dbc5785bf6dd6da30ea63add7e615
X-Runtime: 0.029060
Set-Cookie: __profilin=p%3Dt; path=/
Content-Length: 276

Status

201 Created

Body

{"status":"Webhook created","webhook":{"callback_url":"http://localhost.dev/null?api_key=foo_bar_baz","created_at":"2016-08-04T16:43:23-07:00","enabled":true,"id":1,"list_id":1,"message_sent":false,"subscribe":true,"unsubscribe":true,"updated_at":"2016-08-04T16:43:23-07:00"}}
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.