Webhooks

Update a webhook subscription

Changed on

Updates the URL, event types, or enabled flag. Any field omitted from the request body is left unchanged. The signing secret is unaffected — use POST /webhooks/{id}/rotate-secret to rotate it.

For optimistic concurrency, send If-Match: <etag> using the ETag from a prior GET. A mismatched If-Match returns 409 conflict (the server's ETag is echoed back so you can decide whether to re-fetch). Responses carry the new ETag so chained edits can pipeline without a re-GET.

patch/webhooks/{public_id}

Request

  • Base URL: https://app.sendmux.ai/api/v1
  • URL: https://app.sendmux.ai/api/v1/webhooks/{public_id}
  • Auth: one of:
    • HTTP bearer
    • OAuth 2 (authorization code, authorization URL https://app.sendmux.ai/oauth/authorize, token URL https://app.sendmux.ai/oauth/token, scopes: webhook.update)

Path parameters

public_idstring required

Webhook public ID

Headers

If-Matchstring

Weak ETag from a prior GET. Reject with 409 conflict when the server's current ETag differs.

Request body

enabledboolean

When toggled from false to true, also clears the failing flag — retry deliveries resume on the next matching event.

event_typesstring[]

Replaces the full event-type list. At least one must be provided.

namestring nullable

Replace the human-friendly label. Send null to clear it; omit to leave unchanged.

urlstring uri

New HTTPS endpoint. Must be https://.

Example request

{
  "event_types": [
    "message.bounced"
  ],
  "filters": {
    "mailbox_ids": [
      "mbx_clxxxxxxxxxxxxxxxxxxxxxxxxx"
    ]
  }
}

Response

Updated subscription

oktrue required

Example response

{
  "meta": {
    "request_id": "req_clxxxxxxxxxxxxxxxxxxxxxxxxx"
  },
  "data": {
    "created_at": "2026-04-23T09:12:00Z",
    "enabled": true,
    "event_types": [
      "message.bounced",
      "message.received"
    ],
    "filters": {
      "mailbox_ids": [
        "mbx_clxxxxxxxxxxxxxxxxxxxxxxxxx"
      ]
    },
    "id": "whk_clxxxxxxxxxxxxxxxxxxxxxxxxx",
    "name": "Acme inbound forwarder",
    "updated_at": "2026-04-23T09:12:00Z",
    "url": "https://hooks.acme.com/sendmux"
  }
}

Changes