Skip to main content
POST
/
webhooks
Create a webhook subscription
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"
  }
}

Authorizations

Authorization
string
header
required

Sendmux API key. Obtain from the dashboard under API Keys. Format: smx_root_...

Body

application/json
url
string<uri>
required

HTTPS endpoint that will receive event POSTs. Must be https:// — plain HTTP is rejected.

Example:

"https://hooks.acme.com/sendmux"

event_types
enum<string>[]
required

At least one event type must be provided.

Minimum array length: 1

Event types a webhook may subscribe to. sendmux.test is accepted so you can verify end-to-end delivery via POST /webhooks/{id}/test.

Available options:
ses.bounce,
ses.complaint,
ses.delivery,
ses.reject,
ses.delivery_delay,
mail.inbound,
sendmux.test
Example:
[
"ses.bounce",
"ses.complaint",
"mail.inbound"
]
enabled
boolean

Defaults to true.

Example:

true

Response

Created subscription, including the signing secret.

ok
enum<boolean>
required
Available options:
true
data
object
required
meta
object
required