create_webhook
Register a new webhook endpoint for Smallest AI to receive call and analytics events. Optionally attach agents to specific events at creation.
Instructions
Register a NEW webhook endpoint (delivery URL). Use this only when the target URL does not already exist as a webhook. To point an agent at an ALREADY-REGISTERED webhook, do NOT create a new one — call get_webhooks to find it, then attach_agent_webhook. events is optional: omit it to register the endpoint only, or pass agent+event pairs to attach in the same call. Never guess or default the event types. If the user hasn't said which of call-start (pre-conversation), call-end (post-conversation), or analytics (analytics-completed) they want, ask them before calling.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| events | No | Optional agent + event-type pairs to subscribe at creation. Repeat an agent_id with different event types for multiple events. Never guess or default the event types. If the user hasn't said which of call-start (pre-conversation), call-end (post-conversation), or analytics (analytics-completed) they want, ask them before calling. | |
| headers | No | Custom headers sent with every delivery (e.g. gateway API keys), as key/value pairs. Max 10; reserved headers like content-type are rejected. | |
| endpoint | Yes | The HTTPS URL that will receive webhook deliveries. | |
| description | Yes | A human-readable label for this webhook. |