Events
Sent when someone sends a test from the dashboard or calls Send a test event, also to a paused endpoint. Endpoints don't subscribe to it.
It is signed like every event. It is sent once: it isn't retried, and it isn't in the delivery log. Its X-Chatwise-Delivery header is always wd_test.
Headers
| Header | Description | Example |
|---|---|---|
webhook-id | The event's id, the same on every retry and redelivery. Dedupe on it. | evt_01JE2Z3QK4T8M6N2R5S7V9W1X3 |
webhook-timestamp | When this attempt was signed, in Unix seconds. | 1794475538 |
webhook-signature | One or more signatures, separated by spaces: v1, and the base64 HMAC-SHA256 of <webhook-id>.<webhook-timestamp>.<body>. | v1,<base64> |
X-Chatwise-Event | The event's name. | webhook.test |
X-Chatwise-Delivery | The delivery's id. | wd_test |
User-Agent | Always Chatwise-Webhooks/1.0. | Chatwise-Webhooks/1.0 |
Payload
{
"id": "evt_01JE2Z3QK4T8M6N2R5S7V9W1X3",
"type": "webhook.test",
"timestamp": "2026-11-12T09:25:36.000Z",
"apiVersion": "2026-12-01",
"workspaceId": "42",
"data": {
"endpointId": "we_01JE2Z3K8Q9V7W5X4Y3Z2A1B0C",
"message": "This is a test event from Chatwise."
}
}| Field | Type | Description |
|---|---|---|
id | string | The event's id, the same on every retry and redelivery. Also the webhook-id header. |
type | string | The event's name. Also the X-Chatwise-Event header. Always webhook.test. |
timestamp | string | When the event happened. The same on every retry. ISO 8601, in UTC. |
apiVersion | string | The payload format, as a date. |
workspaceId | string | The workspace the event happened in. |
data | object | What happened. |
data.endpointId | string | The endpoint the test was sent to. |
data.message | string | A fixed sentence. |
Verify it
Check the signature against the raw body before you trust the event. Verify signatures explains each step and has a complete server.
import { createHmac, timingSafeEqual } from "node:crypto";
const FIVE_MINUTES = 5 * 60;
// rawBody is the request body exactly as received (a Buffer or a string).
// headers has lowercase names, as Node's request.headers does.
export function verifyChatwiseWebhook(rawBody, headers, secret, now = Date.now() / 1000) {
const id = headers["webhook-id"];
const timestamp = headers["webhook-timestamp"];
const signatures = headers["webhook-signature"];
if (!id || !timestamp || !signatures) return false;
// Refuse old requests, so a captured one can't be sent again later.
if (!(Math.abs(now - Number(timestamp)) <= FIVE_MINUTES)) return false;
const key = Buffer.from(secret.slice("whsec_".length), "base64");
const expected = createHmac("sha256", key).update(`${id}.${timestamp}.`).update(rawBody).digest();
// While a secret is being rotated there are two signatures. One match is enough.
return signatures.split(" ").some((signature) => {
const [version, value = ""] = signature.split(",");
const received = Buffer.from(value, "base64");
return version === "v1" && received.length === expected.length && timingSafeEqual(received, expected);
});
}Answer it
Answer with any 2xx status within 10 seconds. A test that fails isn't retried.