Webhooks
Handle Twilio inbound PSTN call
Inbound PSTN webhook called by Twilio when a customer dials a Tether-provisioned Twilio number. Resolves the owning org/user, creates a Call record, and returns TwiML that dials the browser client (or the ElevenLabs voice agent when AI calling is enabled).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/xml
application/json
curl -X POST "https://example.com/api/webhook/calls/twilio/inbound" \ -H "Content-Type: application/json" \ -d '{ "To": "+12362320246", "From": "+14165550100", "CallSid": "CA5f7b1c2e8a1d4e0012c3b4a5", "CallStatus": "ringing" }'"<?xml version=\"1.0\" encoding=\"UTF-8\"?><Response><Dial answerOnBridge=\"true\" record=\"record-from-answer\" recordingStatusCallback=\"/api/webhook/calls/twilio/recording\" recordingStatusCallbackMethod=\"POST\"><Client statusCallback=\"/api/webhook/calls/twilio/status\" statusCallbackMethod=\"POST\" statusCallbackEvent=\"initiated,ringing,answered,completed\">client_64a1b2c3d4e5f60012345679</Client></Dial></Response>"