Skip to content
Chatwise
Skip to Content
Developer docs

Update a webhook endpoint

PATCH /v1/webhook-endpoints/{endpointId}. Changes an endpoint.

View as Markdown

PATCHhttps://api.chatwise.so/v1/webhook-endpoints/{endpointId}

Changes an endpoint. Send only the fields to change, at least one.

  • status: PAUSED stops new deliveries: what happens while it is paused isn't sent. Deliveries already waiting are sent once it is active again.
  • status: ACTIVE resumes it, also after Chatwise disabled it, and clears its failure count.
  • Removing an event cancels its deliveries that weren't sent yet. Changing accountIds cancels none.
  • A new url also receives the deliveries that were already waiting.

The API key needs the webhooks:write scope. It also needs messages:read when the endpoint has message.* events, before or after the change. See authentication and scopes.

Example

curl -X PATCH 'https://api.chatwise.so/v1/webhook-endpoints/we_01JE2Z3K8Q9V7W5X4Y3Z2A1B0C' \
  -H "Authorization: Bearer $CHATWISE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "status": "PAUSED"
}'

Path parameters

NameTypeDescription
endpointIdstringRequired. The endpoint's id (we_…).

Body

JSON. Unknown fields are refused with a 400.

FieldTypeDescription
namestringA name for the endpoint, 1 to 80 characters. Spaces around it are ignored. Can't be blank, or contain control characters or unpaired surrogates.
urlstringWhere to send events: a public https:// URL on port 443, without a username, password or #fragment. Spaces around it are ignored. At most 2048 characters.
eventsarray of stringsThe events to receive. message.* events also need the messages:read scope. Each one of message.received, message.sent, message.delivered, message.read, message.failed, comment.received.
accountIdsarray of stringsThe accounts to send events for, instead of the ones it has. An empty list means every account. Leave out to keep them. At most 50.
statusstringPAUSED to stop deliveries, ACTIVE to resume them.

Response

200. The endpoint after the change.

{
  "data": {
    "id": "we_01JE2Z3K8Q9V7W5X4Y3Z2A1B0C",
    "name": "Order support",
    "url": "https://example.com/webhooks/chatwise",
    "events": [
      "message.received"
    ],
    "accountIds": [],
    "status": "PAUSED",
    "apiVersion": "2026-12-01",
    "health": {
      "lastSuccessAt": "2026-11-12T09:21:08.000Z",
      "lastFailureAt": null,
      "consecutiveFailures": 0,
      "disabledAt": null,
      "disabledReason": null
    },
    "createdAt": "2026-11-02T10:00:00.000Z",
    "updatedAt": "2026-11-13T11:20:00.000Z"
  }
}
FieldTypeDescription
data.idstringThe endpoint's id.
data.namestringThe endpoint's name.
data.urlstringWhere events are sent.
data.eventsarray of stringsThe events it receives. Each one of message.received, message.sent, message.delivered, message.read, message.failed, comment.received.
data.accountIdsarray of stringsThe accounts it receives events for. Empty means every account.
data.statusstringACTIVE, PAUSED by the workspace, or DISABLED by Chatwise (see health.disabledReason).
data.apiVersionstringThe payload format it receives, as a date.
data.healthobjectHow its deliveries are going.
data.health.lastSuccessAtstring or nullWhen an attempt last succeeded. ISO 8601, in UTC.
data.health.lastFailureAtstring or nullWhen an attempt last failed. ISO 8601, in UTC.
data.health.consecutiveFailuresintegerFailed attempts since the last success.
data.health.disabledAtstring or nullWhen Chatwise disabled it. ISO 8601, in UTC.
data.health.disabledReasonstring or nullWhy Chatwise disabled it.
data.createdAtstringWhen it was created. ISO 8601, in UTC.
data.updatedAtstringWhen it, or its health, last changed. ISO 8601, in UTC.

Errors

StatusMessageWhat it means
400Expected property name or '}' in JSON at position 1 (line 1 column 2)The request body isn't valid JSON. The message says where.
400Validation failedA parameter or body field is missing, unknown or malformed. errors lists each one.
400Use a public https:// URL on port 443, without a username, password or #fragment.The URL can't receive webhooks.
400Every account id must be one of this workspace's connected accounts.An id in accountIds isn't one of the workspace's accounts.
400Message events need an API key with the messages:read scope too.The key lacks messages:read, which message.* events need.
401A valid Bearer API key is requiredThe Authorization header is missing or isn't Bearer <API key>.
401Invalid or revoked API keyThe key doesn't exist, was revoked, or has expired.
401Invalid API keyChatwise couldn't check the key. Try again.
403API key does not have the required scope: webhooks:writeThe key lacks the route's scope. Create a key that has it.
403Changing an endpoint that receives message events needs an API key with the messages:read scope too.The endpoint has message.* events and the key lacks messages:read.
404Webhook endpoint not foundNo endpoint with this id in the key's workspace.
413request entity too largeThe request body is larger than 100 KB.
429API key rate limit exceededWait the number of seconds in the Retry-After header.
500Internal server errorSomething failed in Chatwise. Retry reads with backoff.

The body of an error is described in errors.

On this page