curl --request POST \
--url https://api.getoutbox.ai/agent/call/{agent_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"contact_id": "<string>",
"phone_number": "<string>",
"full_name": "<string>",
"agent_number": "<string>",
"external_customer_id": "<string>",
"context": {},
"first_message": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.getoutbox.ai/agent/call/{agent_id}"
payload = {
"contact_id": "<string>",
"phone_number": "<string>",
"full_name": "<string>",
"agent_number": "<string>",
"external_customer_id": "<string>",
"context": {},
"first_message": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact_id: '<string>',
phone_number: '<string>',
full_name: '<string>',
agent_number: '<string>',
external_customer_id: '<string>',
context: {},
first_message: '<string>',
scheduled_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.getoutbox.ai/agent/call/{agent_id}', 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.getoutbox.ai/agent/call/{agent_id}",
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([
'contact_id' => '<string>',
'phone_number' => '<string>',
'full_name' => '<string>',
'agent_number' => '<string>',
'external_customer_id' => '<string>',
'context' => [
],
'first_message' => '<string>',
'scheduled_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.getoutbox.ai/agent/call/{agent_id}"
payload := strings.NewReader("{\n \"contact_id\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\",\n \"agent_number\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"context\": {},\n \"first_message\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.getoutbox.ai/agent/call/{agent_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact_id\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\",\n \"agent_number\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"context\": {},\n \"first_message\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoutbox.ai/agent/call/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact_id\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\",\n \"agent_number\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"context\": {},\n \"first_message\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>"
}"<string>"Send AI Call
Initiate an outbound phone call with a voicebot agent (for voicebot agents only)
curl --request POST \
--url https://api.getoutbox.ai/agent/call/{agent_id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"contact_id": "<string>",
"phone_number": "<string>",
"full_name": "<string>",
"agent_number": "<string>",
"external_customer_id": "<string>",
"context": {},
"first_message": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://api.getoutbox.ai/agent/call/{agent_id}"
payload = {
"contact_id": "<string>",
"phone_number": "<string>",
"full_name": "<string>",
"agent_number": "<string>",
"external_customer_id": "<string>",
"context": {},
"first_message": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
contact_id: '<string>',
phone_number: '<string>',
full_name: '<string>',
agent_number: '<string>',
external_customer_id: '<string>',
context: {},
first_message: '<string>',
scheduled_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://api.getoutbox.ai/agent/call/{agent_id}', 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.getoutbox.ai/agent/call/{agent_id}",
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([
'contact_id' => '<string>',
'phone_number' => '<string>',
'full_name' => '<string>',
'agent_number' => '<string>',
'external_customer_id' => '<string>',
'context' => [
],
'first_message' => '<string>',
'scheduled_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"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.getoutbox.ai/agent/call/{agent_id}"
payload := strings.NewReader("{\n \"contact_id\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\",\n \"agent_number\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"context\": {},\n \"first_message\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
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.getoutbox.ai/agent/call/{agent_id}")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"contact_id\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\",\n \"agent_number\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"context\": {},\n \"first_message\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getoutbox.ai/agent/call/{agent_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contact_id\": \"<string>\",\n \"phone_number\": \"<string>\",\n \"full_name\": \"<string>\",\n \"agent_number\": \"<string>\",\n \"external_customer_id\": \"<string>\",\n \"context\": {},\n \"first_message\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "<string>"
}"<string>"Authorizations
Company API Key
Path Parameters
The ID of the voicebot agent
Body
Provide either full_name, phone_number, and external_id (aka external_customer_id), or provide contact_id.
- Option 1
- Option 2
Provide either contact_id, or full_name + phone_number + external_customer_id (external_id).
Existing contact UUID to call. Use this instead of providing contact fields.
Phone number to call (E.164 format recommended)
Full name of the person being called
Phone number to call from (must be assigned to the agent)
External customer ID for tracking (can be passed as external_id).
Custom variables for the call that can be used in prompts with {{variable}} placeholders
Override the agent's default first message
ISO-8601 datetime string for scheduling the call (will be converted to UTC)

