Skip to navigation

Test webhook endpoint

Sends a signed webhook.test event to the endpoint now and returns the delivery with the answer of your server. It makes one attempt and never retries, and it does not count as a failure. It works while the endpoint is paused, so you can check it before turning it on, but not when it is disabled (409 webhook_endpoint_inactive). The event is signed like every other, so it also tests your signature check. The number of tests per hour for each endpoint is limited (429 rate_limited). With a test key nothing is sent: the URL is checked and simulated is true. Required scope: webhooks:manage. With a test key (vx_test_) it is simulated: nothing real happens and nothing is billed. Requires an Idempotency-Key header. Retriable: when the operation itself fails with a 429, a 5xx or a temporary 409, the key is released and a retry with the same key runs the operation again; with no response at all, a retry with the same key returns the first outcome or runs the operation again. A 429 rate_limited from the request limit and 409 request_in_progress come before the operation and leave the key as it is: retry with the same key.

Authentication

AuthorizationBearer
API key created by an Owner or Admin of the organization. Never in the query string.

Path parameters

endpoint_idstringRequiredformat: "uuid"

Id of the webhook endpoint, as returned when it was created or by GET /webhook-endpoints.

Headers

VoxAI-VersionenumOptional

API version for this request; defaults to the version the key is pinned to.

Allowed values:
Idempotency-KeystringRequiredformat: "^[A-Za-z0-9_-]{16,64}$"

A unique value you generate for each new operation (16 to 64 letters, digits, hyphen or underscore; a UUID works). Repeating the same request with the same key within 24 hours returns the first response and does nothing again, when that response was a success or a 4xx error the same request would always get again (not 429, and not the temporary 409 codes request_in_progress, caller_has_active_call and caller_request_in_progress: for those, and for a 5xx, see the note on retrying in the operation); the same key with a different request is refused with idempotency_key_reused.

Response

Successful response.
object"webhook_delivery"

Always webhook_delivery.

idstringformat: "uuid"

Id of the delivery: use it in GET /webhook-deliveries/{delivery_id}.

endpoint_idstringformat: "uuid"
Id of the endpoint the delivery was sent to.
event_idstringformat: "uuid"

Id of the event. It is the same on every attempt and on a resend, and it is the VoxAI-Event-Id header: use it to ignore an event you already processed.

event_typestring

The type of the event, for example call.ended; webhook.test for a test event.

statusenum

pending: waiting for the next attempt. delivered: your server answered with a 2xx status. failed: every attempt failed and no more will be made. discarded: the feature was switched off before it was sent.

Allowed values:
attemptsinteger>=0
Number of attempts made so far. A test or a resend is one attempt.
next_attempt_atdatetime or null

When the next attempt is due, ISO 8601 UTC. null unless status is pending, and always null for a test or a resend.

last_http_statusinteger or null

HTTP status of the last answer of your server; null if it did not answer.

last_errorstring or null

A short safe code for the last failure, null if the last attempt succeeded: http_<status> (for example http_503), timeout, network, dns, address_not_allowed, port_not_allowed, internal_error, feature_not_available, expired, attempt_lost, error. Never text from your server.

duration_msinteger or null>=0

How long the last attempt took, in milliseconds; null if there was none.

manualboolean

A test event or a resend: it counts neither as a failure nor towards the automatic disabling (a success resets the counter).

resend_ofstring or nullformat: "uuid"

Id of the delivery this one is a resend of; null if it is not a resend.

includes_transcriptboolean

true if the body carries the transcript of the call.

created_atdatetime
When the delivery was created, ISO 8601 UTC.
completed_atdatetime or null

When the delivery reached its outcome, ISO 8601 UTC; null while it is pending.

simulatedboolean

true with a test key: the request was validated and NOT sent.

request_bodystring or null

The exact JSON text that was signed and sent, while it is still kept (7 days after the outcome). null after that, and for a key without the read scope of the event family.

response_body_truncatedstring or null

At most the first 1 KiB of your server’s answer, if it sent any. null for a key without the read scope of the event family.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error