Create a webhook
Create an outbound webhook that POSTs workspace events to an https URL. Event keys: conversation.started, conversation.ended, call_log.completed, lead.received, lead.updated, campaign.launched, campaign.scheduled, campaign.paused, campaign.resumed, campaign.completed, campaign.cancelled, campaign.recipient.finished, alert.fired, metric.optimised. Omit events to subscribe to all of them. Returns the signing secret once (deliveries are signed in X-VAI-Signature as t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">); it also stays visible in Settings → Webhooks. Requires workspace-admin.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Path Parameters
Workspace slug (GET /me lists yours).
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/workspaces/string/webhooks" \ -H "Content-Type: application/json" \ -d '{ "endpointUrl": "string" }'{
"webhook": {
"id": "string",
"endpointUrl": "string",
"events": [
"string"
],
"isActive": true,
"property1": null,
"property2": null
},
"secret": "string",
"property1": null,
"property2": null
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Update a contact PATCH
Change one contact's name, tags or field values. tags replaces every tag; addTags and removeTags change some (send one way, not both). fields sets only the keys given, and null clears one. Tags are stored lower case, without commas, at most 40 characters each and 50 a contact.
Delete a webhook DELETE
Delete an outbound webhook by id (from list_workspace_webhooks). Deliveries stop immediately. Destructive, needs confirm: true. Requires workspace-admin.