Every endpoint on this page requires either a Clerk-issued JWT (
Authorization: Bearer <token>) or
an organization API key (x-api-key: pk_…). Anonymous calls return 401 Unauthorized. See
Authentication for the full setup.Why webhooks?
| Use case | Use this |
|---|---|
| Update a CRM when a call ends | Webhooks (durable) |
| Live UI updates while a chat is happening | SSE (low-latency) |
Adding a webhook endpoint
In the Agntix dashboard left nav, open Developer (under Integrations) and click + Add Endpoint in the top-right. A dialog opens with the following fields:Your receiver, e.g.
https://hooks.acme.com/agntix. Must be a public HTTPS URL.Free-form label, e.g.
"Production call events".Requests-per-second cap. Set comfortably above peak (e.g.
50 for a 10-concurrent-call burst).Tick
session.created and/or session.ended. See Event types for the full list.session.created— fires when the call is initiated (before pickup). Use it to lock the originating task as “in-flight”.session.ended— fires when the call closes, with the full post-call analysis attached. This is what your pipeline consumes.
Lifecycle
- Create an endpoint with a public HTTPS URL via Developer → + Add Endpoint.
- Subscribe it to the events you care about — see Events.
- Receive POST requests with a
svix-signatureheader. Verify the signature before trusting the payload — see Verifying signatures. - Reply with 2xx within 15 seconds. Anything else triggers a retry with exponential backoff (24h max).
Payload shape
Session events use a flat envelope (no nesteddata field). The top-level id is the session UUID — use it as your idempotency key.
Idempotency and retries
The webhook is summary-grade, not transcript-grade:- The full message-by-message transcript is not in the webhook.
- Some fields may be truncated for very long calls.
- For the complete picture, pull from
GET /api/v1/chat/sessions/{id}/messages— the webhook arrives first, then you fetch on-demand.
Mapping a call back to your CRM
Production traffic almost always means many parallel calls and webhooks arrive in unpredictable order. To map each webhook back to its originating task, include a unique identifier insession_variables at trigger time:
metadata.sessionVariables in every webhook — regardless of whether the agent prompt referenced them. See Programmatic outbound calling for the full pattern.