Skip to content
Chatwise
Skip to Content
Developer docs

Webhooks

Receive Chatwise events as signed HTTPS requests to your own server.

View as Markdown

A webhook endpoint is a URL of yours that Chatwise sends events to. When a customer writes, on any channel, your server gets a signed POST with the message, its conversation and the account it came in on.

What a delivery looks like

POST /webhooks/chatwise HTTP/1.1
Host: example.com
Content-Type: application/json
User-Agent: Chatwise-Webhooks/1.0
webhook-id: evt_01JE2Z3QK4T8M6N2R5S7V9W1X3
webhook-timestamp: 1794475538
webhook-signature: v1,L1bPoz66MpwZv1+qbTZ/JIqM6Q++GR68lDnkBgwUnw8=
X-Chatwise-Event: message.received
X-Chatwise-Delivery: wd_3f1c0a9b5d7e42688c1f0e2d4b6a8c90

{"id":"evt_01JE2Z3QK4T8M6N2R5S7V9W1X3","type":"message.received", …}
HeaderWhat it is
webhook-idThe event's id. It is the same on every retry and redelivery, so dedupe on it. Two endpoints that receive the same event get the same id.
webhook-timestampWhen this attempt was signed, in Unix seconds.
webhook-signatureThe signature. Two of them while a secret is rotated.
X-Chatwise-EventThe event's name, to route a request before you parse it.
X-Chatwise-DeliveryThe delivery's id, to find it in the delivery log.
User-AgentChatwise-Webhooks/1.0

The body is JSON. Every event has the same outer fields, and data depends on the event: see events.

Set up an endpoint

In the dashboard: open Settings → Developer → Webhooks. Workspace admins and owners can manage endpoints there.

With the API: create a webhook endpoint with a key that has webhooks:write, and messages:read for message.* events.

Creating one returns its signing secret, the only time it is shown. Then:

  1. Verify the signature of every request.
  2. Answer with a 2xx status within 10 seconds, and do the work afterwards.
  3. Skip events you already handled, by webhook-id: delivery is at least once.
  4. Send a test event.

An endpoint receives events that happen after it was created, while it is active.

Pause, resume and delete

  • Pause an endpoint by setting its status to PAUSED. What happens while it is paused isn't sent. Deliveries already waiting are sent once it is active again, to its URL at that time.
  • Resume it with ACTIVE. That also clears its failure count, and turns an endpoint back on that Chatwise disabled.
  • Remove an event from it, and its deliveries that weren't sent yet are cancelled. Changing its accounts cancels none.
  • Delete it, and all of its deliveries that weren't sent yet are cancelled.

What is stored and sent

Events carry the full message and conversation. Chatwise keeps a copy of what it sends for 30 days, for retries and the delivery log. When a message is unsent, deleted or hidden, its waiting deliveries are no longer sent and the log no longer shows it.

Not to be confused with

  • Flows with a webhook trigger receive events from other tools. Webhook endpoints send Chatwise events to your server.
  • MCP event subscriptions wake an AI client that is connected with MCP. They carry ids, not messages, and are set up by the client.

On this page