Create or replace the tenant's webhook endpoint
PUT
/v1/webhook-endpoint
const url = 'https://api.vocapable.com/v1/webhook-endpoint';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://example.com","enabled_events":["call.started"],"api_version_pin":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.vocapable.com/v1/webhook-endpoint \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://example.com", "enabled_events": [ "call.started" ], "api_version_pin": "example" }'Upsert the tenant’s single endpoint.
Creating mints a signing secret and returns it - the only time it is ever readable.
Replacing keeps the stored secret (secret: null) and re-activates an endpoint
that was disabled_by_failures: fixing the URL and re-PUTting is the documented
way back after an auto-disable.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
WebhookEndpointRequest
PUT /webhook-endpoint - the whole configuration, replaced as a unit.
enabled_events is typed as the EventType literal, so subscribing to an event the
catalog does not define fails validation rather than silently never firing. An empty
list is legal: it pauses delivery without discarding the endpoint or its secret.
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
WebhookEndpointSecretView
A summary plus the plaintext secret, when the answering call minted one.
object
id
required
Id
string
url
required
Url
string
enabled_events
required
Enabled Events
Array<string>
status
required
Status
string
created_at
required
Created At
string format: date-time
updated_at
required
Updated At
string format: date-time
Examplegenerated
{ "id": "example", "url": "example", "enabled_events": [ "example" ], "status": "example", "api_version_pin": "example", "previous_secret_expires_at": "2026-04-15T12:00:00Z", "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z", "secret": "example"}Validation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}