Skip to content
Chatwise
Skip to Content
Developer docs

Testing and the delivery log

Send a test event, see what was delivered and why something failed, and send it again.

View as Markdown

Send a test event

Send a test event from the dashboard or with the API. Chatwise sends a signed webhook.test event right away and tells you what your endpoint did:

curl -X POST 'https://api.chatwise.so/v1/webhook-endpoints/we_01JE2Z3K8Q9V7W5X4Y3Z2A1B0C/test' \
  -H "Authorization: Bearer $CHATWISE_API_KEY"
{
  "data": {
    "delivered": false,
    "statusCode": 400,
    "durationMs": 96,
    "error": "http_400"
  }
}
  • The request itself answers 200, also when your endpoint failed. Look at delivered.
  • statusCode is null when there was no answer, and error says why.
  • It works while the endpoint is paused, and needs no subscription.
  • A test isn't retried and isn't in the delivery log.

Test without Chatwise

The OpenAPI file has two signed deliveries under x-webhook-signing-examples, with their secret, headers and exact body. Your verification should accept both when you pass their timestamp as the current time, and refuse them when you change one character of the body.

Read the delivery log

The log has one delivery for each event and endpoint, newest first. List deliveries filters by status and eventType:

curl 'https://api.chatwise.so/v1/webhook-endpoints/we_01JE2Z3K8Q9V7W5X4Y3Z2A1B0C/deliveries?status=FAILED' \
  -H "Authorization: Bearer $CHATWISE_API_KEY"
StatusWhat it means
PENDINGWaiting to be sent.
PROCESSINGBeing sent now.
RETRYThe last attempt failed. nextAttemptAt says when the next one is due.
DELIVEREDYour endpoint answered with a 2xx status.
FAILEDIt won't be sent again by itself. lastError says why.
CANCELLEDThe endpoint stopped subscribing to the event before it was delivered. An attempt that was under way may have arrived.

Get a delivery adds its payload and its attempts. A success on the first try has no entry in attemptLog. Its time and status are on the delivery. After a redelivery the attempt numbers start again and the earlier attempts stay, so sort them by startedAt.

Why a delivery failed

lastErrorWhat happenedRetried
http_408, http_425, http_429, http_5xxYour endpoint answered with that status.Yes
timeoutNo answer within 10 seconds.Yes
networkChatwise couldn't connect, or the connection broke.Yes
delivery_errorSomething failed in Chatwise.Yes
http_410Your endpoint answered 410 Gone. Chatwise disabled it.No
http_3xx, other http_4xxYour endpoint answered with that status. Redirects aren't followed.No
invalid_urlThe URL can't be used.No
private_addressThe URL's name leads to a private address.No
payload_too_largeThe event is larger than 256 KiB.No
message_removedThe message was unsent, deleted or hidden before it was sent.No
retry_exhaustedAll 8 attempts failed. It takes the place of the last attempt's own error.No

http_5xx stands for the actual status, such as http_503.

Redeliver

Redeliver sends a delivery again, with the same event id and from its first attempt, with all its retries. Do it after you fixed your endpoint:

curl -X POST 'https://api.chatwise.so/v1/webhook-deliveries/wd_3f1c0a9b5d7e42688c1f0e2d4b6a8c90/redeliver' \
  -H "Authorization: Bearer $CHATWISE_API_KEY"

You can redeliver what was delivered, failed, was cancelled or is waiting for a retry, for 30 days. While the endpoint is paused or disabled, it waits. It is refused with a 400 when:

  • the delivery is already waiting or being sent;
  • the endpoint no longer subscribes to the event;
  • the message was unsent, deleted or hidden.

A receiver that dedupes on webhook-id skips a redelivery of an event it already handled.

On this page