Skip to main content
POST
Create a webhook endpoint

Authorizations

Authorization
string
header
required

API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.

Body

application/json
label
string
required

Your chosen endpoint label. Lowercase letters, numbers, and hyphens only; 1-31 characters. Unique per account, not per scope — reusing a label on a second agent returns 409 LABEL_TAKEN. The reserved default label cannot be created here.

Pattern: ^[a-z0-9][a-z0-9-]{0,30}$
Example:

"prod"

url
string<uri>
required

HTTPS URL that receives webhook events.

Example:

"https://example.com/webhooks/vocobase"

enabled
boolean
default:true

Whether the endpoint should receive new webhook events.

agent_id
string<uuid> | null

Bind the endpoint to a single agent, so it receives only that agent's events. Omit or send null for an account-wide endpoint that receives every agent's events. Agent-scoped endpoints are additive — they do not suppress account-wide ones. Set once: this field is immutable and PATCH rejects it. An agent that is not yours returns 404 NOT_FOUND.

events
enum<string>[]

Event allowlist. Omit or send [] to receive every event type, including ones added later. Unknown values are rejected with 400 VALIDATION_ERROR; duplicates are de-duplicated. webhook.test is not a valid value — test events always reach the endpoint being tested.

A webhook event type. This is the complete catalog and the only set accepted in an endpoint's events allowlist. webhook.test is deliberately absent: it is fired only by POST /config/webhooks/{id}/test and always reaches the endpoint being tested regardless of its allowlist. There is no session.failed event — a session that ends in a terminal failure is delivered as session.completed with duration_seconds: 0, transcript: null, and a terminal call.status.

Available options:
session.completed,
call.status.updated,
call.transferred,
whatsapp.message.sent,
whatsapp.message.failed,
whatsapp.message.status_updated

Response

Webhook endpoint created. Save the secret immediately.

success
boolean
data
object