Send a test event
POST /v1/webhook-endpoints/{endpointId}/test. Sends a signed `webhook.test` event now and answers with what your endpoint did.
POSThttps://api.chatwise.so/v1/webhook-endpoints/{endpointId}/test
Sends a signed webhook.test event now and answers with what your endpoint did. It also works while the endpoint is paused. Tests aren't retried and don't appear in the delivery log.
The API key needs the webhooks:write scope. See authentication and scopes.
Example
curl -X POST 'https://api.chatwise.so/v1/webhook-endpoints/we_01JE2Z3K8Q9V7W5X4Y3Z2A1B0C/test' \
-H "Authorization: Bearer $CHATWISE_API_KEY"Path parameters
| Name | Type | Description |
|---|---|---|
endpointId | string | Required. The endpoint's id (we_…). |
Response
200. What your endpoint answered. Check delivered: this is 200 even when your endpoint failed.
{
"data": {
"delivered": true,
"statusCode": 204,
"durationMs": 182,
"error": null
}
}| Field | Type | Description |
|---|---|---|
data.delivered | boolean | Whether your endpoint answered with a 2xx status. |
data.statusCode | integer or null | The HTTP status it answered, if it did. |
data.durationMs | integer | How long it took, in milliseconds. |
data.error | string or null | Why it failed, such as http_500 or timeout. |
Errors
| Status | Message | What it means |
|---|---|---|
| 400 | Validation failed | A parameter or body field is missing, unknown or malformed. errors lists each one. |
| 401 | A valid Bearer API key is required | The Authorization header is missing or isn't Bearer <API key>. |
| 401 | Invalid or revoked API key | The key doesn't exist, was revoked, or has expired. |
| 401 | Invalid API key | Chatwise couldn't check the key. Try again. |
| 403 | API key does not have the required scope: webhooks:write | The key lacks the route's scope. Create a key that has it. |
| 404 | Webhook endpoint not found | No endpoint with this id in the key's workspace. |
| 429 | API key rate limit exceeded | Wait the number of seconds in the Retry-After header. |
| 500 | Internal server error | Something failed in Chatwise. Retry reads with backoff. |
The body of an error is described in errors.
Delete a webhook endpoint
DELETE /v1/webhook-endpoints/{endpointId}. Deletes an endpoint and cancels its deliveries that weren't sent yet.
Rotate the signing secret
POST /v1/webhook-endpoints/{endpointId}/rotate-secret. Replaces the endpoint's signing secret and returns the new one, the only time it is returned.