calls
Initiate Outbound Call
Initiate an outbound call from an agent.
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
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.
Destination phone number (E.164 format, spaces auto-stripped)
Caller ID (E.164 format, spaces auto-stripped)
Additional call context/metadata
Call priority level
Pattern:
^(low|normal|high|urgent)$Enable Krisp noise cancellation for this call
Wait for call to be answered before returning
Custom caller ID display name
DTMF tones to send after call connects (e.g., '*123#ww456')
Play dial tone while call is connecting
Media encryption level
Pattern:
^(DISABLE|ALLOW|REQUIRE)$Max time to wait for answer (1-80 seconds)
Required range:
1 <= x <= 80Maximum call duration
Required range:
60 <= x <= 86400Hide phone number from participant attributes
Custom SIP X-* headers
Show child attributes
Show child attributes
⌘I
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": {}
}
]
}