Skip to main content

Test Webhook

POST /v1/webhooks/{id}/test
Sends a synthetic webhook.test event to the webhook’s configured URL and returns the delivery result (HTTP status and latency). Use it to confirm a webhook endpoint is reachable and that signature verification works before relying on it. The test delivery goes through the same hardened path as real events: the resolve-and-pin SSRF egress (a test cannot reach a private/internal address) and the same HMAC signing. The attempt is recorded in the webhook’s delivery logs. Retries are disabled for the test so you get an immediate result.

Response

{
  "data": {
    "success": true,
    "status": 200,
    "response_time_ms": 142
  },
  "meta": { "request_id": "550e8400-e29b-41d4-a716-446655440000" }
}
When delivery fails, success is false and error describes why:
{
  "data": { "success": false, "response_time_ms": 5012, "error": "Request timeout" },
  "meta": { "request_id": "..." }
}
curl -X POST https://api.knoxcall.com/v1/webhooks/a1b2c3d4-.../test \
  -H "Authorization: Bearer kc_live_abc123..."
const resp = await fetch(
  "https://api.knoxcall.com/v1/webhooks/a1b2c3d4-.../test",
  { method: "POST", headers: { Authorization: "Bearer kc_live_abc123..." } }
);
const { data } = await resp.json();
console.log(data.success ? `delivered in ${data.response_time_ms}ms` : data.error);

Errors

StatusTypeDescription
404not_foundNo webhook with that ID in the current mode (Live/Sandbox)
403permission_deniedTenant policy denies the test action on webhook