curl --request POST \
--url https://app.sendmux.ai/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://hooks.acme.com/sendmux",
"event_types": [
"ses.bounce",
"ses.complaint",
"mail.inbound"
]
}
'{
"ok": true,
"data": {
"id": "twhk_clxxxxxxxxxxxxxxxxxxxxxxxxx",
"url": "https://hooks.acme.com/sendmux",
"event_types": [
"ses.bounce",
"ses.complaint"
],
"enabled": true,
"failing": false,
"created_at": "2026-04-23T09:12:00Z",
"updated_at": "2026-04-23T09:12:00Z",
"secret": "whsec_a9f3c2…"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}Creates a new webhook subscription and returns the signing secret ONCE in the response body. Store it securely — it cannot be retrieved later. Use POST /webhooks/{id}/rotate-secret to issue a new one.
curl --request POST \
--url https://app.sendmux.ai/api/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"url": "https://hooks.acme.com/sendmux",
"event_types": [
"ses.bounce",
"ses.complaint",
"mail.inbound"
]
}
'{
"ok": true,
"data": {
"id": "twhk_clxxxxxxxxxxxxxxxxxxxxxxxxx",
"url": "https://hooks.acme.com/sendmux",
"event_types": [
"ses.bounce",
"ses.complaint"
],
"enabled": true,
"failing": false,
"created_at": "2026-04-23T09:12:00Z",
"updated_at": "2026-04-23T09:12:00Z",
"secret": "whsec_a9f3c2…"
},
"meta": {
"request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
}
}Sendmux API key. Obtain from the dashboard under API Keys. Format: smx_root_...
HTTPS endpoint that will receive event POSTs. Must be https:// — plain HTTP is rejected.
"https://hooks.acme.com/sendmux"
At least one event type must be provided.
1Event types a webhook may subscribe to. sendmux.test is accepted so you can verify end-to-end delivery via POST /webhooks/{id}/test.
ses.bounce, ses.complaint, ses.delivery, ses.reject, ses.delivery_delay, mail.inbound, sendmux.test [
"ses.bounce",
"ses.complaint",
"mail.inbound"
]Defaults to true.
true
Created subscription, including the signing secret.
true Hide child attributes
Webhook public ID
"twhk_clxxxxxxxxxxxxxxxxxxxxxxxxx"
HTTPS endpoint that receives signed event POSTs.
"https://hooks.acme.com/sendmux"
Event types this subscription receives.
Event types a webhook may subscribe to. sendmux.test is accepted so you can verify end-to-end delivery via POST /webhooks/{id}/test.
ses.bounce, ses.complaint, ses.delivery, ses.reject, ses.delivery_delay, mail.inbound, sendmux.test ["ses.bounce", "ses.complaint"]When false, no events are delivered to this subscription.
true
True when the 24-hour retry window has been exhausted for this subscription. Reset by updating the subscription (e.g. fixing the URL) and re-enabling.
false
ISO 8601 creation timestamp
"2026-04-23T09:12:00Z"
ISO 8601 last-modified timestamp
"2026-04-23T09:12:00Z"
Signing secret used to verify the HMAC-SHA256 signature on every event POST. This is the ONLY response containing the raw secret — store it securely; it cannot be retrieved later. Use POST /webhooks/{id}/rotate-secret to issue a new one.
"whsec_a9f3c2…"
Was this page helpful?