Calls
Initiate an outbound AI voice call
Places an outbound call to a contact using the configured AI voice provider (currently ElevenLabs, which originates into the Sinch Voice API SIP termination endpoint). Resolves or creates the contact, picks a voice-enabled agent (Prompt), picks a Sinch number permitted to dial with the AI (routing.outbound.ai) to call from, and asks the provider to dial. Guarded by a 30s Redis idempotency lock keyed on user+contact+agent+toNumber; concurrent retries return 429 with OUTBOUND_IN_FLIGHT. Caches conversation context for the post-call webhook.
Authorization
bearerAuth In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Either contactId or phoneNumber must be supplied. phoneNumber will find-or-create a contact.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/calls/ai/outbound" \ -H "Content-Type: application/json" \ -d '{ "contactId": "64f0a1b2c3d4e5f6a7b8c9d0", "agentId": "64f0a1b2c3d4e5f6a7b8cc00", "fromNumber": "+14165550100", "callReason": "Follow up on insurance quote" }'{ "success": true, "conversationId": "eleven-conv-abc123", "sipCallId": "sip-call-xyz789", "message": "AI call initiated", "deduplicated": false}