Create a webhook endpoint
Creates an endpoint and returns its signing secret. The secret is shown only once. Free.
bearerAuthAuthorizationBearer <API key>Create a key in the app under Developers. Keys start with dcd_live_.
application/json- body
url*stringWhere we send events. Must be a public https URL.
urilength <= 2000events*array<>Events to send to this URL.
1 <= itemsaudience_ids?array<>|Only send audience events for these audiences. Null for all audiences.
Success.
application/json- response
A new webhook endpoint, including its signing secret. This is the only time the secret is shown.
id*stringWebhook endpoint id. Starts with wh_.
^wh_url*stringWhere we send events.
events*array<>Events to send to this URL.
1 <= itemsaudience_ids*array<>|Only send audience events for these audiences. Null for all audiences.
status*string'disabled' after 3 events in a row fail all their retries. Re-enable it with PATCH.
"active""disabled"failure_count*integerEvents in a row that have failed all their retries.
0 <= value <= 9007199254740991created_at*stringWhen the endpoint was created.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$date-timesecret*stringSigning secret, starts with whsec_. Shown once. Use it to verify the Diced-Signature header.
^whsec_request_id*stringId of the request that produced this response. A replayed idempotent response keeps the original id.
curl -X POST 'https://api.diced.si/v1/webhooks' \ -H 'Authorization: Bearer dcd_live_your_key' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://example.com/webhooks/diced", "events": [ "audience.ready", "audience.new_leads" ]}'{ "id": "string", "url": "string", "events": [ "audience.ready" ], "audience_ids": [ "string" ], "status": "active", "failure_count": 0, "created_at": "2019-08-24T14:15:22Z", "secret": "string", "request_id": "string"}