Skip to main content
POST
/
v1
/
create-phone-call
Create Phone Call
curl --request POST \
  --url https://api.openmic.ai/v1/create-phone-call \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "from_number": "+1234567890",
  "to_number": "+0987654321",
  "override_agent_id": "bvrg8wzi487w02m2bc7dh0ev",
  "customer_id": "customer_001",
  "dynamic_variables": {
    "name": "John"
  },
  "callback_url": "https://example.com/callback"
}'
{
  "call_type": "phonecall",
  "from_number": "+1234567890",
  "to_number": "+0987654321",
  "direction": "outbound",
  "call_id": "cmbbvrg8wzi487w02m2bc7dji",
  "agent_id": "bvrg8wzi487w02m2bc7dh0ev",
  "call_status": "registered",
  "customer_id": "customer_001",
  "dynamic_variables": {
    "name": "John"
  }
}

Authorizations

Authorization
string
header
required

Bearer token authentication using API key. Find it at: https://chat.openmic.ai/api-key

Body

application/json

Call creation details

from_number
string
required

The number you own in E.164 format. Must be a number purchased from OpenMic.

Example:

"+1234567890"

to_number
string
required

The number you want to call in E.164 format.

Example:

"+0987654321"

override_agent_id
string

The bot UID to override the default agent.

Example:

"bvrg8wzi487w02m2bc7dh0ev"

customer_id
string

Customer identifier for tracking

Example:

"customer_001"

dynamic_variables
object

Send dynamic variables in key value pairs to replace in the prompt.

Example:
{ "name": "John" }
callback_url
string

Callback URL to receive call events.

Example:

"https://example.com/callback"

Response

Call created successfully

call_type
enum<string>
required

Type of call

Available options:
phonecall,
webcall
from_number
string
required

Originating phone number

to_number
string
required

Destination phone number

direction
enum<string>
required

Call direction

Available options:
inbound,
outbound
call_id
string
required

Unique call identifier

agent_id
string
required

Bot/agent identifier

call_status
enum<string>
required

Current call status

Available options:
registered,
ongoing,
ended,
error
customer_id
string

Customer identifier

telephony_identifier
object

Telephony system identifiers

start_timestamp
integer

Call start time (Unix timestamp in milliseconds)

end_timestamp
integer

Call end time (Unix timestamp in milliseconds)

duration_ms
integer

Call duration in milliseconds

transcript
string[][]

Call transcript as array of [speaker, message] pairs

recording_url
string

URL to call recording

latency
object

Latency metrics for different components

call_analysis
object

Post-call analysis results including summary and success metrics

call_cost
object

Detailed cost breakdown for the call

dynamic_variables
object

Send dynamic variables in key value pairs to replace in the prompt.

Example:
{ "name": "John" }