Get set up
Send a test event
POST /v1/webhook/test sends a signed test message and marks the webhook verified on a 2xx reply.
Overview
POST/v1/webhook/test
Sends one webhook.test message to your URL and waits up to 10 seconds for the reply. A 2xx reply marks the webhook as verified. Test events are free and are not retried. You can send one every 3 seconds.
Changing the URL clears the verified state, so send a new test after every URL change.
Request
Request
curl -sS -X POST "https://webhooks.gray3.io/v1/webhook/test" \
-H "X-Gray-Project-Id: proj_your_project_id" \
-H "Authorization: Bearer gray_whk_your_webhook_key"Response
Returns the webhook with the result in lastTest.
HTTP 200 — success envelope wraps the payload in data.
json
{
"data": {
"id": "whk_3b9d…",
"url": "https://api.example.com/webhooks/gray3",
"status": "active",
"verified": true,
"verifiedAt": "2026-10-16T09:30:00.412Z",
"lastTest": {
"at": "2026-10-16T09:30:00.412Z",
"ok": true,
"responseCode": 200,
"latencyMs": 184
}
}
}A failed test still returns HTTP 200. Check lastTest.ok, and read lastTest.error for the reason, such as Your server responded 500.
Errors
Errors use HTTP { "error": { "code", "message", "retryable" } }. Branch on code, not the message text.
| Code | HTTP | When |
|---|---|---|
| not_found | 404 | The project has no webhook yet |
| rate_limit_exceeded | 429 | Another test was sent less than 3 seconds ago (retryable) |
json
{
"error": {
"code": "not_found",
"message": "Human-readable detail (may be sanitized).",
"retryable": false
}
}