Webhooks

Handle ElevenLabs pre-call personalization webhook

POST
/api/webhook/elevenlabs/personalization

Inbound webhook called by ElevenLabs when a call connects so the AI agent can greet the caller by name. Looks up the contact by caller_id, caches the call context in Redis (24h TTL) for the post-call webhook, and returns dynamic variables for prompt injection. Authenticated via Bearer token (per-org elevenlabsToolSecret).

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/api/webhook/elevenlabs/personalization" \  -H "Content-Type: application/json" \  -d '{    "conversation_id": "conv_8f3d1b9c2e7a4f0b9a4d2c1e6e2f8c01",    "caller_id": "+14165550100",    "called_id": "+12362320246",    "agent_id": "agent_a8d3c4e09b2f4e1ab3c45f6a7b8c9d01"  }'
{  "caller_name": "Alex Morgan",  "caller_number": "+14165550100",  "org_name": "Acme Corp"}