Webhooks API
Webhook subscriptions and delivery logs.
Each event is sent as one POST with a JSON body {event, timestamp, data} to each of the organization’s active subscriptions that lists that event. The payload of every event is documented under webhooks in this document.
Signing. Every request carries X-Webhook-Timestamp (Unix time in seconds) and X-Webhook-Signature. The signature is the lowercase hex HMAC-SHA256 of {timestamp}.{raw body}, keyed with the subscription secret. It has no prefix. To verify, take the raw request body before parsing it, compute the HMAC over the X-Webhook-Timestamp value, a ., and the raw body, and compare the result with the header. Use the header timestamp, not the timestamp field in the body.
Delivery. Each event is attempted once. There is no retry. The request times out after 5 seconds in total, with 3 seconds to connect. Redirects are not followed. Any 2xx response counts as success; anything else is a failure. The target URL is checked again at delivery time, and a target that resolves to a private or internal address is not called. Requests are sent with Content-Type: application/json and User-Agent: Vosy-Webhook/1.0, plus the subscription’s custom headers. Every attempt is recorded and can be read from GET /webhooks/{id}/logs.
Test deliveries. POST /webhooks/{id}/test sends a webhook.test event signed the same way. It differs from a real delivery: it is sent whatever the subscription’s status or events, it uses User-Agent: VoiceAI-Webhook/1.0, and it times out after 30 seconds in total, with 10 seconds to connect.
- GET
/webhooksList webhook subscriptions - POST
/webhooksCreate a subscription - GET
/webhooks/{id}Get a subscription - PATCH
/webhooks/{id}Update a subscription - DELETE
/webhooks/{id}Delete a subscription - POST
/webhooks/{id}/testSend a test event - GET
/webhooks/{id}/logsGet delivery logs
GET /webhooks
List webhook subscriptions
Auth: API key (Authorization: Bearer). Scopes: webhooks:read, webhooks:manage.
Requires one of the following scopes: webhooks:read, webhooks:manage.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Max items to return (1-100). Default |
offset | query | integer | Number of items to skip. Default |
status | query | string | One of: |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | array of object required | |
data[].id | integer | |
data[].name | string | null | Label for the subscription; defaults to the target host when omitted at creation. |
data[].url | string | |
data[].events | array of string | |
data[].status | string | active = delivering; paused and disabled both stop delivery. One of: |
data[].description | string | null | |
data[].headers | object | Accepts any keys |
data[].created_at | string (date-time) | |
data[].updated_at | string (date-time) | null | |
meta | object | Offset pagination metadata (in the top-level meta object). |
meta.total | integer | |
meta.limit | integer | |
meta.offset | integer | |
meta.has_more | boolean |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
POST /webhooks
Create a subscription
Auth: API key (Authorization: Bearer). Scopes: webhooks:write, webhooks:manage.
Registers a webhook endpoint. The signing secret is returned once, only on creation. It is 64 hex characters and is generated by the platform. A new subscription starts active and receives events straight away.
Validation, each failure returning 400: url must be a valid HTTPS URL of at most 2048 characters whose hostname resolves; a URL that targets localhost, or a private, reserved, or internal address or hostname, is refused. name is at most 100 characters and description at most 2000. events must be a non-empty array of known event names. headers must be an object of text values with no line breaks.
See the Webhooks tag description for how deliveries are signed and sent.
Requires one of the following scopes: webhooks:write, webhooks:manage.
Request body application/json required
| Field | Type | Description |
|---|---|---|
name | string | Optional label; defaults to the target host. max length 100 |
url | string (uri) required | Must be a valid HTTPS URL. The hostname must resolve. A URL that targets localhost, or a private, reserved, or internal address or hostname, is refused with max length 2048 |
events | array of string required | Events to subscribe to. A name outside this list is refused with Delivered today: Accepted but not currently sent: Scheduling emits min items 1 |
description | string | max length 2000 |
headers | object | Extra request headers sent with each delivery. Must be an object of text values. Header names and values must not contain line breaks. Anything else is refused with Accepts any keys; each value is string |
Responses
201 Subscription created
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.name | string | null | Label for the subscription; defaults to the target host when omitted at creation. |
data.url | string | |
data.events | array of string | |
data.status | string | active = delivering; paused and disabled both stop delivery. One of: |
data.description | string | null | |
data.headers | object | Accepts any keys |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | null | |
data.secret | string | HMAC signing secret; returned only on creation. |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
GET /webhooks/{id}
Get a subscription
Auth: API key (Authorization: Bearer). Scopes: webhooks:read, webhooks:manage.
Requires one of the following scopes: webhooks:read, webhooks:manage.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Webhook id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.name | string | null | Label for the subscription; defaults to the target host when omitted at creation. |
data.url | string | |
data.events | array of string | |
data.status | string | active = delivering; paused and disabled both stop delivery. One of: |
data.description | string | null | |
data.headers | object | Accepts any keys |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | null |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
PATCH /webhooks/{id}
Update a subscription
Auth: API key (Authorization: Bearer). Scopes: webhooks:write, webhooks:manage.
Updates the supplied fields. A request with no recognised field returns 400.
Validation, each failure returning 400: url, when sent, must be a valid HTTPS URL whose hostname resolves; a URL that targets localhost, or a private, reserved, or internal address or hostname, is refused. name must not be empty; a longer value is cut to 100 characters. description is at most 2000 characters. events must be a non-empty array of known event names. status must be active, paused, or disabled. headers must be an object of text values with no line breaks.
Requires one of the following scopes: webhooks:write, webhooks:manage.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Webhook id |
Request body application/json required
| Field | Type | Description |
|---|---|---|
name | string | Must not be empty. A value longer than 100 characters is cut to 100, not refused. min length 1 |
url | string (uri) | Must be a valid HTTPS URL. The hostname must resolve. A URL that targets localhost, or a private, reserved, or internal address or hostname, is refused with |
events | array of string | Events to subscribe to. A name outside this list is refused with Delivered today: Accepted but not currently sent: Scheduling emits min items 1 |
status | string | Accepted values: One of: |
description | string | max length 2000 |
headers | object | Extra request headers sent with each delivery. Must be an object of text values. Header names and values must not contain line breaks. Anything else is refused with Accepts any keys; each value is string |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.id | integer | |
data.name | string | null | Label for the subscription; defaults to the target host when omitted at creation. |
data.url | string | |
data.events | array of string | |
data.status | string | active = delivering; paused and disabled both stop delivery. One of: |
data.description | string | null | |
data.headers | object | Accepts any keys |
data.created_at | string (date-time) | |
data.updated_at | string (date-time) | null |
400 Invalid request (validation errors under error.details.validation_errors).
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
DELETE /webhooks/{id}
Delete a subscription
Auth: API key (Authorization: Bearer). Scopes: webhooks:delete, webhooks:manage.
Requires one of the following scopes: webhooks:delete, webhooks:manage.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Webhook id |
Responses
204 Deleted
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
POST /webhooks/{id}/test
Send a test event
Auth: API key (Authorization: Bearer). Scopes: webhooks:write, webhooks:manage.
Sends one webhook.test event to the subscription URL and reports the outcome. The event is sent whatever the subscription’s status or events. This call returns 200 whether or not the delivery succeeded; read data.success. The attempt is recorded in the delivery log. A test delivery uses User-Agent: VoiceAI-Webhook/1.0 and times out after 30 seconds in total, with 10 seconds to connect. It is signed like any other delivery.
Requires one of the following scopes: webhooks:write, webhooks:manage.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Webhook id |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | object required | |
data.success | boolean | |
data.status_code | integer | null | |
data.response_time_ms | integer | |
data.error | string |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
GET /webhooks/{id}/logs
Get delivery logs
Auth: API key (Authorization: Bearer). Scopes: webhooks:read, webhooks:manage.
Requires one of the following scopes: webhooks:read, webhooks:manage.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | path | integer required | Webhook id |
limit | query | integer | Max items to return (1-100). Default |
offset | query | integer | Number of items to skip. Default |
Responses
200 Success
Headers: X-Request-ID, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-API-Key-Expires-At, X-API-Key-Expires-In-Days
Response fields
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
data | array of object required | |
data[].id | integer | |
data[].event_type | string | |
data[].status_code | integer | null | |
data[].success | boolean | |
data[].error | string | null | |
data[].response_time_ms | integer | null | |
data[].created_at | string (date-time) |
401 Missing or invalid API key.
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
403 Authenticated but not permitted (insufficient scope uses the auth envelope with code INSUFFICIENT_SCOPE; policy/plan denials use the router envelope).
Headers: X-Request-ID
Response fields
Shape 1 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.code | string required | e.g. MISSING_AUTH, INVALID_API_KEY, INSUFFICIENT_SCOPE, RATE_LIMIT_EXCEEDED. |
error.message | string required | |
error.retry_after | integer | Seconds; present on 429 only. |
Shape 2 of 2
| Field | Type | Description |
|---|---|---|
success | boolean required | Always |
error | object required | |
error.message | string required | |
error.code | string required | Machine-readable error code, e.g. bad_request, not_found. |
error.details | object | null | Optional; validation failures put field errors under details.validation_errors. Accepts any keys |
404 Resource not found (also returned for cross-tenant ids to avoid existence leaks).
429 Rate limit exceeded.
Headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-Request-ID
Ready to build on Vosy?
API access is included with the Business and Enterprise plans. Sign up, choose a plan with API access, and create your own keys from the Vosy API page in your account. Compare plans
Get Started