Create Webhook Endpoint

Register a new URL to receive webhook events.

POST/webhooks/endpoints

Register a new webhook endpoint.

No parameters for this endpoint.


Request Body

FieldTypeRequiredDefaultDescription
urlstringYesHTTPS URL to receive events
event_typesstring[]YesList of event types to subscribe to
agent_idintegerNonullFilter events to a specific agent (null = all agents)
descriptionstringNonullHuman-readable description
max_retriesintegerNo3Number of retry attempts (0–5)
timeout_msintegerNo5000Request timeout in milliseconds

Response

{
  "status": "success",
  "endpoint": {
    "id": 1,
    "url": "https://your-app.com/webhooks/thinnestai",
    "secret": "a1b2c3d4e5f6...",
    "event_types": ["chat.message.completed", "voice.call.ended"],
    "agent_id": null,
    "description": "Production webhook",
    "is_active": true,
    "max_retries": 3,
    "timeout_ms": 5000,
    "created_at": "2026-03-16T10:00:00"
  }
}

The secret is only returned on creation. Save it immediately — it cannot be retrieved later.

Errors

StatusDescription
400Invalid URL (not HTTPS), invalid event types, or max 20 endpoints reached
401Missing or invalid API key

On this page