Skip to main content

Webhooks

Webhooks let you receive real-time HTTP notifications when events occur in your VOCALS tenant. Configure a URL and subscribe to specific event types; VOCALS will POST a JSON payload to your endpoint whenever a matching event fires.

Event Types

EventDescription
call.startedA call has started (inbound or outbound)
call.endedA call has ended
transcript.readyThe full transcript for a call is available

List Webhooks

GET /webhooks

Returns all webhook configurations for the current tenant, ordered by creation date.

Response

[
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"url": "https://example.com/vocals-webhook",
"events": ["call.started", "call.ended"],
"is_active": true,
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-02-20T14:00:00Z"
}
]

Response Fields

FieldTypeDescription
iduuidWebhook config ID
urlstringDestination URL for event payloads
eventsarrayList of subscribed event types
is_activebooleanWhether the webhook is active
created_atdatetimeCreation timestamp
updated_atdatetimeLast update timestamp

Create Webhook

POST /webhooks

Request Body

{
"url": "https://example.com/vocals-webhook",
"events": ["call.started", "call.ended", "transcript.ready"],
"is_active": true
}

Request Fields

FieldTypeRequiredDefaultDescription
urlstringYes--HTTPS URL to receive webhook payloads
eventsarrayYes--Event types to subscribe to
is_activebooleanNotrueWhether the webhook is active

Response

201 Created -- Returns the WebhookResponse object.

Update Webhook

PUT /webhooks/{webhook_id}

Partial updates are supported. Only include the fields you want to change.

Request Body

{
"url": "https://new-url.example.com/webhook",
"events": ["call.ended"],
"is_active": false
}

Request Fields

FieldTypeRequiredDescription
urlstringNoUpdated destination URL
eventsarrayNoUpdated event subscriptions
is_activebooleanNoEnable or disable the webhook

Response

200 OK -- Returns the updated WebhookResponse.

Delete Webhook

DELETE /webhooks/{webhook_id}

Permanently deletes a webhook configuration and its delivery history.

Response

204 No Content

Delivery Logs

GET /webhooks/{webhook_id}/deliveries

Returns a paginated list of delivery attempts for a specific webhook, ordered by most recent first. Use this to troubleshoot failed deliveries.

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
page_sizeinteger20Items per page (max 100)

Response

{
"items": [
{
"id": "660e8400-...",
"event_type": "call.ended",
"status_code": 200,
"attempts": 1,
"last_attempt_at": "2026-03-01T14:32:50Z",
"created_at": "2026-03-01T14:32:45Z"
},
{
"id": "770e8400-...",
"event_type": "call.started",
"status_code": 500,
"attempts": 3,
"last_attempt_at": "2026-03-01T14:31:15Z",
"created_at": "2026-03-01T14:30:05Z"
}
],
"total": 85,
"page": 1,
"page_size": 20
}

Delivery Log Fields

FieldTypeDescription
iduuidDelivery log ID
event_typestringThe event that triggered this delivery
status_codeinteger | nullHTTP status code from the webhook endpoint (null if no response)
attemptsintegerNumber of delivery attempts
last_attempt_atdatetime | nullTimestamp of the most recent attempt
created_atdatetimeWhen the delivery was first triggered