curl --request POST \
--url https://omni-api.sendblue.com/admin/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"url": "https://hooks.acme.com/omni",
"events": [
"message.delivered"
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://hooks.acme.com/omni', events: ['message.delivered']})
};
fetch('https://omni-api.sendblue.com/admin/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/admin/webhooks"
payload = {
"url": "https://hooks.acme.com/omni",
"events": ["message.delivered"]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "881e85ab-1007-46bf-8fed-75bd85a2033c",
"url": "https://hooks.acme.com/omni",
"events": [
"message.delivered"
],
"enabled": true,
"created_at": "2026-11-23T18:04:05.000000Z",
"updated_at": "2026-11-23T18:04:05.000000Z"
}{
"id": "881e85ab-1007-46bf-8fed-75bd85a2033c",
"url": "https://hooks.acme.com/omni",
"events": [
"message.delivered"
],
"enabled": true,
"created_at": "2026-11-23T18:04:05.000000Z",
"updated_at": "2026-11-23T18:04:05.000000Z",
"secret": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Register a webhook endpoint and show its signing secret once.
Requires webhooks:manage. The idempotency key identifies the registration within this account.
An equal retry returns 200 with the endpoint metadata, including any later edits.
A changed request under the same key returns 409 idempotency_conflict.
An invalid destination or event list returns 400 invalid_request. Reaching the
account’s limit of 16 active and disabled endpoints returns 422 unprocessable. If the first response was lost,
rotate the endpoint secret with a new rotation key.
Required permission: webhooks:manage. Accepted credentials: a signed-in administrator, an API key, the account token.
curl --request POST \
--url https://omni-api.sendblue.com/admin/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"url": "https://hooks.acme.com/omni",
"events": [
"message.delivered"
]
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({url: 'https://hooks.acme.com/omni', events: ['message.delivered']})
};
fetch('https://omni-api.sendblue.com/admin/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://omni-api.sendblue.com/admin/webhooks"
payload = {
"url": "https://hooks.acme.com/omni",
"events": ["message.delivered"]
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "881e85ab-1007-46bf-8fed-75bd85a2033c",
"url": "https://hooks.acme.com/omni",
"events": [
"message.delivered"
],
"enabled": true,
"created_at": "2026-11-23T18:04:05.000000Z",
"updated_at": "2026-11-23T18:04:05.000000Z"
}{
"id": "881e85ab-1007-46bf-8fed-75bd85a2033c",
"url": "https://hooks.acme.com/omni",
"events": [
"message.delivered"
],
"enabled": true,
"created_at": "2026-11-23T18:04:05.000000Z",
"updated_at": "2026-11-23T18:04:05.000000Z",
"secret": "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
}{
"error": {
"code": "invalid_request",
"message": "Unknown field",
"details": {
"field": "colour"
}
}
}Authorizations
Headers
Body
1 - 11 elementsThe message.sent, message.delivered, message.failed and message.received types describe those transitions. Other emitted message lifecycle changes use message.updated. A completed call emits call.completed. Other emitted call transitions use call.updated. Number acquisition, routing, campaign assignment, activation and release emit number.updated. Registration changes emit brand.updated and campaign.updated with their public resource. A top-up request, hosted link, payment, failure or recorded expiry emits top_up.updated. A clock-only expiry is visible on GET.
message.sent, message.delivered, message.failed, message.received, message.updated, call.updated, call.completed, brand.updated, campaign.updated, number.updated, top_up.updated Response
Metadata from an equal retry.
1 - 11 elementsThe message.sent, message.delivered, message.failed and message.received types describe those transitions. Other emitted message lifecycle changes use message.updated. A completed call emits call.completed. Other emitted call transitions use call.updated. Number acquisition, routing, campaign assignment, activation and release emit number.updated. Registration changes emit brand.updated and campaign.updated with their public resource. A top-up request, hosted link, payment, failure or recorded expiry emits top_up.updated. A clock-only expiry is visible on GET.
message.sent, message.delivered, message.failed, message.received, message.updated, call.updated, call.completed, brand.updated, campaign.updated, number.updated, top_up.updated