Skip to main content
POST
/
calls
/
outbound
Initiate Outbound Call
curl --request POST \
  --url https://api.example.com/calls/outbound \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "to_number": "<string>",
  "from_number": "<string>",
  "context": {},
  "priority": "normal",
  "krisp_enabled": true,
  "wait_until_answered": false,
  "display_name": "<string>",
  "dtmf": "<string>",
  "play_dialtone": false,
  "media_encryption": "ALLOW",
  "ringing_timeout_seconds": 80,
  "max_call_duration_seconds": 3600,
  "hide_phone_number": false,
  "custom_headers": {}
}
'
import requests

url = "https://api.example.com/calls/outbound"

payload = {
"agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"to_number": "<string>",
"from_number": "<string>",
"context": {},
"priority": "normal",
"krisp_enabled": True,
"wait_until_answered": False,
"display_name": "<string>",
"dtmf": "<string>",
"play_dialtone": False,
"media_encryption": "ALLOW",
"ringing_timeout_seconds": 80,
"max_call_duration_seconds": 3600,
"hide_phone_number": False,
"custom_headers": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
to_number: '<string>',
from_number: '<string>',
context: {},
priority: 'normal',
krisp_enabled: true,
wait_until_answered: false,
display_name: '<string>',
dtmf: '<string>',
play_dialtone: false,
media_encryption: 'ALLOW',
ringing_timeout_seconds: 80,
max_call_duration_seconds: 3600,
hide_phone_number: false,
custom_headers: {}
})
};

fetch('https://api.example.com/calls/outbound', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/calls/outbound",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'agent_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'to_number' => '<string>',
'from_number' => '<string>',
'context' => [

],
'priority' => 'normal',
'krisp_enabled' => true,
'wait_until_answered' => false,
'display_name' => '<string>',
'dtmf' => '<string>',
'play_dialtone' => false,
'media_encryption' => 'ALLOW',
'ringing_timeout_seconds' => 80,
'max_call_duration_seconds' => 3600,
'hide_phone_number' => false,
'custom_headers' => [

]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.example.com/calls/outbound"

payload := strings.NewReader("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to_number\": \"<string>\",\n \"from_number\": \"<string>\",\n \"context\": {},\n \"priority\": \"normal\",\n \"krisp_enabled\": true,\n \"wait_until_answered\": false,\n \"display_name\": \"<string>\",\n \"dtmf\": \"<string>\",\n \"play_dialtone\": false,\n \"media_encryption\": \"ALLOW\",\n \"ringing_timeout_seconds\": 80,\n \"max_call_duration_seconds\": 3600,\n \"hide_phone_number\": false,\n \"custom_headers\": {}\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.example.com/calls/outbound")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to_number\": \"<string>\",\n \"from_number\": \"<string>\",\n \"context\": {},\n \"priority\": \"normal\",\n \"krisp_enabled\": true,\n \"wait_until_answered\": false,\n \"display_name\": \"<string>\",\n \"dtmf\": \"<string>\",\n \"play_dialtone\": false,\n \"media_encryption\": \"ALLOW\",\n \"ringing_timeout_seconds\": 80,\n \"max_call_duration_seconds\": 3600,\n \"hide_phone_number\": false,\n \"custom_headers\": {}\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.example.com/calls/outbound")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"to_number\": \"<string>\",\n \"from_number\": \"<string>\",\n \"context\": {},\n \"priority\": \"normal\",\n \"krisp_enabled\": true,\n \"wait_until_answered\": false,\n \"display_name\": \"<string>\",\n \"dtmf\": \"<string>\",\n \"play_dialtone\": false,\n \"media_encryption\": \"ALLOW\",\n \"ringing_timeout_seconds\": 80,\n \"max_call_duration_seconds\": 3600,\n \"hide_phone_number\": false,\n \"custom_headers\": {}\n}"

response = http.request(request)
puts response.read_body
{
  "call_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "session_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "room_name": "<string>",
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "direction": "<string>",
  "from_number": "<string>",
  "to_number": "<string>",
  "status": "<string>",
  "recording": {}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Outbound call request model with full LiveKit SIP support.

agent_id
string<uuid>
required
to_number
string
required

Destination phone number (E.164 format, spaces auto-stripped)

from_number
string | null

Caller ID (E.164 format, spaces auto-stripped)

context
Context · object | null

Additional call context/metadata

priority
string
default:normal

Call priority level

Pattern: ^(low|normal|high|urgent)$
krisp_enabled
boolean
default:true

Enable Krisp noise cancellation for this call

wait_until_answered
boolean
default:false

Wait for call to be answered before returning

display_name
string | null

Custom caller ID display name

dtmf
string | null

DTMF tones to send after call connects (e.g., '*123#ww456')

play_dialtone
boolean
default:false

Play dial tone while call is connecting

media_encryption
string
default:ALLOW

Media encryption level

Pattern: ^(DISABLE|ALLOW|REQUIRE)$
ringing_timeout_seconds
integer
default:80

Max time to wait for answer (1-80 seconds)

Required range: 1 <= x <= 80
max_call_duration_seconds
integer
default:3600

Maximum call duration

Required range: 60 <= x <= 86400
hide_phone_number
boolean
default:false

Hide phone number from participant attributes

custom_headers
Custom Headers · object | null

Custom SIP X-* headers

Response

Successful Response

Call response model.

call_id
string<uuid>
required
session_id
string<uuid>
required
room_name
string
required
agent_id
string<uuid>
required
direction
string
required
from_number
string
required
to_number
string
required
status
string
required
recording
Recording · object | null