Overview
Creates a new outbound phone call. The AI agent will call the specified phone number and handle the conversation based on its configuration.
Calls are billed based on duration. See Pricing for details.
Request
Bearer token for authentication.Example: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
Body Parameters
The phone number to call in E.164 format.Example: +14155551234Constraints:
- Must start with
+ followed by country code
- 10-15 digits total
- Must be a valid, dialable phone number
Your Solo Mobile phone number to use as caller ID. Must be a number provisioned in your account.Example: +16045551234
UUID of the AI agent to handle the call.Example: c72ea2b8-1234-5678-9abc-def012345678
Optional key-value pairs to attach to the call. Available in webhooks and call logs.Example:{
"customer_id": "cust_123",
"campaign": "follow_up"
}
URL to receive call status webhooks. Overrides account-level webhook settings.Example: https://yourapp.com/webhooks/calls
Response
Whether the call was successfully initiated.
Unique identifier for the call. Use this to track call status.
Initial call status. One of:
initiated - Call is being placed
queued - Call is queued for dialing
The caller ID number used.
The destination phone number.
The agent handling the call.
ISO 8601 timestamp of when the call was created.
Example Request
curl -X POST "https://mtxbiyilvgwhbdptysex.supabase.co/functions/v1/initiate-bridged-call" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"to": "+14155551234",
"from": "+16045551234",
"agent_id": "c72ea2b8-1234-5678-9abc-def012345678"
}'
Example Response
{
"success": true,
"call_id": "a1b2c3d4-5678-9012-3456-789012345678",
"status": "initiated",
"from_number": "+16045551234",
"to_number": "+14155551234",
"agent_id": "c72ea2b8-1234-5678-9abc-def012345678",
"created_at": "2024-01-15T10:30:00.000Z"
}
Error Responses
{
"error": {
"code": "INVALID_PHONE_NUMBER",
"message": "The 'to' field must be a valid E.164 phone number"
}
}
{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or expired access token"
}
}
{
"error": {
"code": "INSUFFICIENT_BALANCE",
"message": "Insufficient account balance to place call"
}
}
{
"error": {
"code": "AGENT_NOT_FOUND",
"message": "Agent with specified ID not found"
}
}
{
"error": {
"code": "NUMBER_NOT_OWNED",
"message": "The 'from' number is not provisioned in your account"
}
}
Call Status Webhook
When the call status changes, a webhook is sent to your configured URL:
{
"event": "call.status_changed",
"call_id": "a1b2c3d4-5678-9012-3456-789012345678",
"status": "completed",
"duration": 125,
"recording_url": "https://storage.solomobile.ai/recordings/...",
"transcript": "Agent: Hello! Caller: Hi there...",
"metadata": {
"customer_id": "cust_123"
},
"timestamp": "2024-01-15T10:32:05.000Z"
}
Call Status Values
| Status | Description |
|---|
initiated | Call request received, dialing |
ringing | Recipient phone is ringing |
in-progress | Call is active |
completed | Call ended normally |
busy | Recipient was busy |
no-answer | No answer after timeout |
failed | Call failed to connect |
canceled | Call was canceled before connecting |
Your Solo Mobile access token from the dashboard
Destination phone number in E.164 format
Your Solo Mobile phone number (must be provisioned in your account)
UUID of the agent to handle this call
Custom key-value pairs attached to the call for your reference
Example:{
"customer_id": "cust_123",
"campaign": "follow_up"
}
URL to receive call status webhooks (overrides account default)
Maximum call duration in seconds
Required range: 60 <= x <= 3600
Whether to record this call
Call initiated successfully