cherami.
API referenceWebhooks

Edit a webhook

PATCH /v1/webhooks/{webhook_id}

Read as Markdown ↗

PATCH /v1/webhooks/{webhook_id}

Requires an API key: Authorization: Bearer YOUR_CREDENTIAL.

Changes the event types, inbox scope or enabled state. The URL can't be edited: add a webhook with the new URL, then delete this one.

Values are absolute, so a lost or uncertain change is safe to repeat with the same values.

Parameters

ParameterLocationRequiredTypeMeaning
webhook_idpathYesstringCherami resource ID returned by the API.

Request body

JSON object, at most 4 KiB in total.

Schema: UpdateWebhook

Omitted fields stay as they are, and a supplied array replaces the whole list.

FieldRequiredTypeMeaning and constraints
event_typesNoarray of WebhookEventTypeminItems: 1 maxItems: 2
inbox_idsNoarray of stringReplaces the scope with up to 10 of the account's live inboxes; [] means every inbox, including ones created later. Omit it to keep the current scope. maxItems: 10
enabledNobooleanfalse pauses deliveries; true resumes them, including after repeated delivery failures disabled the webhook.

Unknown fields are rejected.

At least 1 field must be supplied.

curl example

Supply CHERAMI_API_KEY privately.

Save the payload as request.json, replacing the example values.

{
  "event_types": [
    "message.received",
    "message.sent"
  ],
  "enabled": true
}
curl --silent --show-error --include --request PATCH \
  "https://cherami.to/v1/webhooks/WEBHOOK_ID" \
  --header "Authorization: Bearer $CHERAMI_API_KEY" \
  --header 'Content-Type: application/json' \
  --data-binary @request.json

Responses

HTTP 200

Success.

  • X-Request-ID: Identifies this request; include it when reporting a problem.

Content type: application/json.

Webhook

{
  "id": "55555555-5555-4555-8555-555555555555",
  "created_at": "2026-10-01T00:00:00.000Z",
  "url": "https://example.com/hooks/cherami",
  "event_types": [
    "message.received"
  ],
  "inbox_ids": [
    "11111111-1111-4111-8111-111111111111"
  ],
  "deleted_inbox_ids": [],
  "enabled": true,
  "updated_at": "2026-10-01T00:00:00.000Z",
  "status": "active",
  "pending_operation": null,
  "secret_rotated_at": null,
  "previous_secret_expires_at": null
}

HTTP 400

invalid_json: Send a valid UTF-8 JSON object, not an array or scalar.

invalid_webhook_update: Supply at least one of event_types, inbox_ids and enabled, with enabled as a boolean.

invalid_webhook_event_types: Supply a nonempty array of message.received, message.sent or both.

invalid_webhook_inbox_ids: Supply inbox_ids as an array of at most 10 inbox IDs, or an empty array for every inbox.

unknown_webhook_inbox: An inbox_ids entry is not a live inbox of this account. Remove the IDs listed in error.details.inbox_ids.

invalid_webhook_settings: The settings were refused, and nothing changed. Read the webhook, then send corrected values.

  • X-Request-ID: Identifies this request; include it when reporting a problem.

Content type: application/json.

Error

HTTP 401

unauthorized: Send a valid API key as Authorization: Bearer <key>. If the key stopped working, get a new one through recovery.

  • X-Request-ID: Identifies this request; include it when reporting a problem.
  • WWW-Authenticate: "Bearer"

Content type: application/json.

Error

HTTP 404

not_found: The resource does not exist or does not belong to this account. A reply or forward source must also be in the sending inbox.

  • X-Request-ID: Identifies this request; include it when reporting a problem.

Content type: application/json.

Error

HTTP 409

webhook_operation_in_progress: Another change to this webhook is in progress. Retry in a minute.

webhook_endpoint_missing: This webhook no longer receives events and cannot be changed. Delete it and add it again; the new webhook has a new ID and signing secret.

  • X-Request-ID: Identifies this request; include it when reporting a problem.

Content type: application/json.

Error

HTTP 413

body_too_large: Reduce the JSON request to the operation's body limit.

  • X-Request-ID: Identifies this request; include it when reporting a problem.

Content type: application/json.

Error

HTTP 415

unsupported_media_type: Send Content-Type: application/json.

  • X-Request-ID: Identifies this request; include it when reporting a problem.

Content type: application/json.

Error

HTTP 503

webhook_provider_unavailable: The request could not be completed, and nothing changed. Retry later.

webhook_settings_uncertain: The settings change was not confirmed. Apply the same values again; repeating them is safe.

webhooks_unavailable: Webhook management failed. If it was a change, it may have been applied: list or read the webhooks before repeating it.

  • X-Request-ID: Identifies this request; include it when reporting a problem.

Content type: application/json.

Error

Schema: Webhook

status is active (delivering), disabled (not delivering until you set enabled to true; you or repeated delivery failures turned it off), pending (creation or removal not yet confirmed; read it again shortly) or unknown (the configuration couldn't be read and its fields are null; if it stays unknown, delete the webhook and add it again). pending_operation names the unconfirmed work.

FieldRequiredTypeMeaning and constraints
idYesstringCherami resource ID.
created_atYesstringUTC timestamp with milliseconds. format: date-time pattern: ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
urlYesstring or nullDestination URL; null while status is pending or unknown.
event_typesYesarray of WebhookEventType or null
inbox_idsYesarray of string or nullScoped inboxes; empty means every inbox.
deleted_inbox_idsYesarray of stringScoped inboxes that have since been deleted. They match nothing; edit inbox_ids to remove them.
enabledYesboolean or null
updated_atYesstring or null
statusYes"active" or "disabled" or "pending" or "unknown"
pending_operationYesobject or null
secret_rotated_atYesstring or null
previous_secret_expires_atYesstring or null

Schema: WebhookEventType

message.received: a received message is ready to read. message.sent: the provider accepted a sent message, which is not delivery.

"message.received" or "message.sent"

Schema: Error

FieldRequiredTypeMeaning and constraints
errorYesobject

error fields

FieldRequiredTypeMeaning and constraints
codeYesstringCode to handle. Handle a code you don't recognize by its HTTP status.
messageYesstringExplanation of this case; its wording can change.

Errors, limits and pagination · Download OpenAPI 3.1

On this page