Legacy — will be deprecated soon. Use the versioned endpoint (POST /v1/call) for new integrations.
Starts an outbound phone call to the given number using the specified agent. The call is placed asynchronously — use webhook_url to receive a notification when the call completes. The request and response contract is identical to POST /v1/call.
To place the call later instead, pass scheduled_at as a 24-hour IST time (11:00) or ISO 8601 with offset (2026-09-12T11:00:00+05:30). The response returns immediately with the call_id the webhook will carry once the call is placed.
POST
/
call
Initiate a phone call
curl --request POST \ --url https://api.osvi.ai/call \ --header 'API-Token: <api-key>' \ --header 'Content-Type: application/json' \ --data '{ "agent_uuid": "agent_IsxxxxSf_60EhxxxxMGbz-Rxxg", "phone_number": "9876543210", "country_code": "IN", "system_prompt": "You are calling to confirm the appointment scheduled for tomorrow at 10 AM.", "webhook_url": "https://yourdomain.com/osvi-webhook", "person_name": "John Doe", "additional_data": { "appointment_date": "2025-01-15", "product_name": "Premium Plan" }, "initial_greeting": "Hello John, this is a reminder about your appointment tomorrow at 10 AM.", "call_config_overrides": { "max_call_duration_seconds": 300, "enable_callback": false, "retry_config": { "enabled": true, "max_attempts": 2, "interval_minutes": 30 } }, "data_extraction": [ { "key": "appointment_confirmed", "description": "Ask if they can confirm their appointment for tomorrow at 10 AM.", "required": true, "output_format": "yes or no" }, { "key": "reschedule_preference", "description": "If they cannot make it, ask what date and time works better.", "required": false, "output_format": "date and time" } ], "scheduled_at": "2026-09-12T11:00:00+05:30"}'
import requests
url = "https://api.osvi.ai/call"
payload = {
"agent_uuid": "agent_IsxxxxSf_60EhxxxxMGbz-Rxxg",
"phone_number": "9876543210",
"country_code": "IN",
"system_prompt": "You are calling to confirm the appointment scheduled for tomorrow at 10 AM.",
"webhook_url": "https://yourdomain.com/osvi-webhook",
"person_name": "John Doe",
"additional_data": {
"appointment_date": "2025-01-15",
"product_name": "Premium Plan"
},
"initial_greeting": "Hello John, this is a reminder about your appointment tomorrow at 10 AM.",
"call_config_overrides": {
"max_call_duration_seconds": 300,
"enable_callback": False,
"retry_config": {
"enabled": True,
"max_attempts": 2,
"interval_minutes": 30
}
},
"data_extraction": [
{
"key": "appointment_confirmed",
"description": "Ask if they can confirm their appointment for tomorrow at 10 AM.",
"required": True,
"output_format": "yes or no"
},
{
"key": "reschedule_preference",
"description": "If they cannot make it, ask what date and time works better.",
"required": False,
"output_format": "date and time"
}
],
"scheduled_at": "2026-09-12T11:00:00+05:30"
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_uuid: 'agent_IsxxxxSf_60EhxxxxMGbz-Rxxg',
phone_number: '9876543210',
country_code: 'IN',
system_prompt: 'You are calling to confirm the appointment scheduled for tomorrow at 10 AM.',
webhook_url: 'https://yourdomain.com/osvi-webhook',
person_name: 'John Doe',
additional_data: {appointment_date: '2025-01-15', product_name: 'Premium Plan'},
initial_greeting: 'Hello John, this is a reminder about your appointment tomorrow at 10 AM.',
call_config_overrides: {
max_call_duration_seconds: 300,
enable_callback: false,
retry_config: {enabled: true, max_attempts: 2, interval_minutes: 30}
},
data_extraction: [
{
key: 'appointment_confirmed',
description: 'Ask if they can confirm their appointment for tomorrow at 10 AM.',
required: true,
output_format: 'yes or no'
},
{
key: 'reschedule_preference',
description: 'If they cannot make it, ask what date and time works better.',
required: false,
output_format: 'date and time'
}
],
scheduled_at: '2026-09-12T11:00:00+05:30'
})
};
fetch('https://api.osvi.ai/call', 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.osvi.ai/call",
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_uuid' => 'agent_IsxxxxSf_60EhxxxxMGbz-Rxxg',
'phone_number' => '9876543210',
'country_code' => 'IN',
'system_prompt' => 'You are calling to confirm the appointment scheduled for tomorrow at 10 AM.',
'webhook_url' => 'https://yourdomain.com/osvi-webhook',
'person_name' => 'John Doe',
'additional_data' => [
'appointment_date' => '2025-01-15',
'product_name' => 'Premium Plan'
],
'initial_greeting' => 'Hello John, this is a reminder about your appointment tomorrow at 10 AM.',
'call_config_overrides' => [
'max_call_duration_seconds' => 300,
'enable_callback' => false,
'retry_config' => [
'enabled' => true,
'max_attempts' => 2,
'interval_minutes' => 30
]
],
'data_extraction' => [
[
'key' => 'appointment_confirmed',
'description' => 'Ask if they can confirm their appointment for tomorrow at 10 AM.',
'required' => true,
'output_format' => 'yes or no'
],
[
'key' => 'reschedule_preference',
'description' => 'If they cannot make it, ask what date and time works better.',
'required' => false,
'output_format' => 'date and time'
]
],
'scheduled_at' => '2026-09-12T11:00:00+05:30'
]),
CURLOPT_HTTPHEADER => [
"API-Token: <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.osvi.ai/call"
payload := strings.NewReader("{\n \"agent_uuid\": \"agent_IsxxxxSf_60EhxxxxMGbz-Rxxg\",\n \"phone_number\": \"9876543210\",\n \"country_code\": \"IN\",\n \"system_prompt\": \"You are calling to confirm the appointment scheduled for tomorrow at 10 AM.\",\n \"webhook_url\": \"https://yourdomain.com/osvi-webhook\",\n \"person_name\": \"John Doe\",\n \"additional_data\": {\n \"appointment_date\": \"2025-01-15\",\n \"product_name\": \"Premium Plan\"\n },\n \"initial_greeting\": \"Hello John, this is a reminder about your appointment tomorrow at 10 AM.\",\n \"call_config_overrides\": {\n \"max_call_duration_seconds\": 300,\n \"enable_callback\": false,\n \"retry_config\": {\n \"enabled\": true,\n \"max_attempts\": 2,\n \"interval_minutes\": 30\n }\n },\n \"data_extraction\": [\n {\n \"key\": \"appointment_confirmed\",\n \"description\": \"Ask if they can confirm their appointment for tomorrow at 10 AM.\",\n \"required\": true,\n \"output_format\": \"yes or no\"\n },\n {\n \"key\": \"reschedule_preference\",\n \"description\": \"If they cannot make it, ask what date and time works better.\",\n \"required\": false,\n \"output_format\": \"date and time\"\n }\n ],\n \"scheduled_at\": \"2026-09-12T11:00:00+05:30\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Token", "<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.osvi.ai/call")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_uuid\": \"agent_IsxxxxSf_60EhxxxxMGbz-Rxxg\",\n \"phone_number\": \"9876543210\",\n \"country_code\": \"IN\",\n \"system_prompt\": \"You are calling to confirm the appointment scheduled for tomorrow at 10 AM.\",\n \"webhook_url\": \"https://yourdomain.com/osvi-webhook\",\n \"person_name\": \"John Doe\",\n \"additional_data\": {\n \"appointment_date\": \"2025-01-15\",\n \"product_name\": \"Premium Plan\"\n },\n \"initial_greeting\": \"Hello John, this is a reminder about your appointment tomorrow at 10 AM.\",\n \"call_config_overrides\": {\n \"max_call_duration_seconds\": 300,\n \"enable_callback\": false,\n \"retry_config\": {\n \"enabled\": true,\n \"max_attempts\": 2,\n \"interval_minutes\": 30\n }\n },\n \"data_extraction\": [\n {\n \"key\": \"appointment_confirmed\",\n \"description\": \"Ask if they can confirm their appointment for tomorrow at 10 AM.\",\n \"required\": true,\n \"output_format\": \"yes or no\"\n },\n {\n \"key\": \"reschedule_preference\",\n \"description\": \"If they cannot make it, ask what date and time works better.\",\n \"required\": false,\n \"output_format\": \"date and time\"\n }\n ],\n \"scheduled_at\": \"2026-09-12T11:00:00+05:30\"\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.osvi.ai/call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_uuid\": \"agent_IsxxxxSf_60EhxxxxMGbz-Rxxg\",\n \"phone_number\": \"9876543210\",\n \"country_code\": \"IN\",\n \"system_prompt\": \"You are calling to confirm the appointment scheduled for tomorrow at 10 AM.\",\n \"webhook_url\": \"https://yourdomain.com/osvi-webhook\",\n \"person_name\": \"John Doe\",\n \"additional_data\": {\n \"appointment_date\": \"2025-01-15\",\n \"product_name\": \"Premium Plan\"\n },\n \"initial_greeting\": \"Hello John, this is a reminder about your appointment tomorrow at 10 AM.\",\n \"call_config_overrides\": {\n \"max_call_duration_seconds\": 300,\n \"enable_callback\": false,\n \"retry_config\": {\n \"enabled\": true,\n \"max_attempts\": 2,\n \"interval_minutes\": 30\n }\n },\n \"data_extraction\": [\n {\n \"key\": \"appointment_confirmed\",\n \"description\": \"Ask if they can confirm their appointment for tomorrow at 10 AM.\",\n \"required\": true,\n \"output_format\": \"yes or no\"\n },\n {\n \"key\": \"reschedule_preference\",\n \"description\": \"If they cannot make it, ask what date and time works better.\",\n \"required\": false,\n \"output_format\": \"date and time\"\n }\n ],\n \"scheduled_at\": \"2026-09-12T11:00:00+05:30\"\n}"
response = http.request(request)
puts response.read_body
{
"success": false,
"error": "webhook_url is set but post_call_analysis is not enabled on this agent",
"details": null
}
{
"success": false,
"error": "Invalid API token"
}
{
"success": false,
"error": "Agent not found or not associated with this account",
"details": null
}
{
"success": false,
"error": "No phone number is attached to this agent. Attach an outbound number under Agent → Telephony before placing calls.",
"details": {
"error_code": "NO_OUTBOUND_NUMBER_CONFIGURED",
"action": "attach_number"
}
}
Authorizations
API-Token
string
header
required
16-character API token associated with your OSVI account. Find it in your dashboard under Settings → API.
Body
application/json
agent_uuid
string
required
Unique identifier of the OSVI agent that will handle the call. Must belong to the account that owns the API token, otherwise the request is rejected with 403 Forbidden.
Example:
"agent_IsxxxxSf_60EhxxxxMGbz-Rxxg"
phone_number
string
required
Destination phone number (digits only, without country code). Normalized and validated against country_code; an implausible number returns 400 Bad Request.
Example:
"9876543210"
country_code
string
required
ISO 3166-1 alpha-2 country code of the destination number. Must be a recognized country code, otherwise the request is rejected with 400 Bad Request.
Example:
"IN"
system_prompt
string
Optional runtime override for the agent's system prompt for this call only.
Example:
"You are calling to confirm the appointment scheduled for tomorrow at 10 AM."
webhook_url
string<uri>
URL that OSVI will POST to when the call completes. Must be a valid HTTP or HTTPS URL that includes a host. The payload matches the webhook schema documented in the Webhooks section.
Example:
"https://yourdomain.com/osvi-webhook"
person_name
string
Name of the person being called. Made available to the agent during the call.
Example:
"John Doe"
additional_data
object
Arbitrary key-value object passed to the agent at runtime. Use this to provide context the agent can reference during the conversation. Must be a JSON object — arrays or scalar values are rejected with 400 Bad Request.
List of data points the agent should attempt to extract during the conversation. Must be an array; each item requires a non-empty description.
Show child attributes
Example:
[ { "key": "appointment_confirmed", "description": "Ask if they can confirm their appointment for tomorrow at 10 AM.", "required": true, "output_format": "yes or no" }, { "key": "reschedule_preference", "description": "If they cannot make it, ask what date and time works better.", "required": false, "output_format": "date and time" } ]
scheduled_at
string
Optional. When set, the call is queued and placed at this time instead of immediately. A string in 24-hour format, in one of two shapes:
HH:MM — a time in IST (Asia/Kolkata). Placed today at that time if it is still ahead, otherwise tomorrow at that time. Example: 11:00.
YYYY-MM-DDTHH:MM:SS+05:30 — ISO 8601 with an explicit UTC offset, used exactly as given. Use this for a specific date, or for a zone other than IST. Seconds are required, fractional seconds are accepted (2026-09-12T05:30:00.000Z, as JavaScript's toISOString() emits), and the offset may be Z, ±HH:MM or ±HHMM up to ±14:00. Example: 2026-09-12T11:00:00+05:30.
Must be in the future and at most 90 days ahead. Rejected with 400 Bad Request: Unix timestamps, 12-hour clocks (11 am), date-times without an offset, and any out-of-range field (12:60, 25:00, +15:00, an invalid calendar date). Nothing is normalised silently.
Calls scheduled for the same moment start together up to the agent's concurrency limit and the rest follow as slots free up. The agent's campaign calling window still applies. All other fields behave exactly as for an immediate call.
Example:
"2026-09-12T11:00:00+05:30"
Response
Call initiated successfully
success
boolean
Example:
true
data
object
Show child attributes
⌘I
Initiate a phone call
curl --request POST \ --url https://api.osvi.ai/call \ --header 'API-Token: <api-key>' \ --header 'Content-Type: application/json' \ --data '{ "agent_uuid": "agent_IsxxxxSf_60EhxxxxMGbz-Rxxg", "phone_number": "9876543210", "country_code": "IN", "system_prompt": "You are calling to confirm the appointment scheduled for tomorrow at 10 AM.", "webhook_url": "https://yourdomain.com/osvi-webhook", "person_name": "John Doe", "additional_data": { "appointment_date": "2025-01-15", "product_name": "Premium Plan" }, "initial_greeting": "Hello John, this is a reminder about your appointment tomorrow at 10 AM.", "call_config_overrides": { "max_call_duration_seconds": 300, "enable_callback": false, "retry_config": { "enabled": true, "max_attempts": 2, "interval_minutes": 30 } }, "data_extraction": [ { "key": "appointment_confirmed", "description": "Ask if they can confirm their appointment for tomorrow at 10 AM.", "required": true, "output_format": "yes or no" }, { "key": "reschedule_preference", "description": "If they cannot make it, ask what date and time works better.", "required": false, "output_format": "date and time" } ], "scheduled_at": "2026-09-12T11:00:00+05:30"}'
import requests
url = "https://api.osvi.ai/call"
payload = {
"agent_uuid": "agent_IsxxxxSf_60EhxxxxMGbz-Rxxg",
"phone_number": "9876543210",
"country_code": "IN",
"system_prompt": "You are calling to confirm the appointment scheduled for tomorrow at 10 AM.",
"webhook_url": "https://yourdomain.com/osvi-webhook",
"person_name": "John Doe",
"additional_data": {
"appointment_date": "2025-01-15",
"product_name": "Premium Plan"
},
"initial_greeting": "Hello John, this is a reminder about your appointment tomorrow at 10 AM.",
"call_config_overrides": {
"max_call_duration_seconds": 300,
"enable_callback": False,
"retry_config": {
"enabled": True,
"max_attempts": 2,
"interval_minutes": 30
}
},
"data_extraction": [
{
"key": "appointment_confirmed",
"description": "Ask if they can confirm their appointment for tomorrow at 10 AM.",
"required": True,
"output_format": "yes or no"
},
{
"key": "reschedule_preference",
"description": "If they cannot make it, ask what date and time works better.",
"required": False,
"output_format": "date and time"
}
],
"scheduled_at": "2026-09-12T11:00:00+05:30"
}
headers = {
"API-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)
const options = {
method: 'POST',
headers: {'API-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
agent_uuid: 'agent_IsxxxxSf_60EhxxxxMGbz-Rxxg',
phone_number: '9876543210',
country_code: 'IN',
system_prompt: 'You are calling to confirm the appointment scheduled for tomorrow at 10 AM.',
webhook_url: 'https://yourdomain.com/osvi-webhook',
person_name: 'John Doe',
additional_data: {appointment_date: '2025-01-15', product_name: 'Premium Plan'},
initial_greeting: 'Hello John, this is a reminder about your appointment tomorrow at 10 AM.',
call_config_overrides: {
max_call_duration_seconds: 300,
enable_callback: false,
retry_config: {enabled: true, max_attempts: 2, interval_minutes: 30}
},
data_extraction: [
{
key: 'appointment_confirmed',
description: 'Ask if they can confirm their appointment for tomorrow at 10 AM.',
required: true,
output_format: 'yes or no'
},
{
key: 'reschedule_preference',
description: 'If they cannot make it, ask what date and time works better.',
required: false,
output_format: 'date and time'
}
],
scheduled_at: '2026-09-12T11:00:00+05:30'
})
};
fetch('https://api.osvi.ai/call', 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.osvi.ai/call",
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_uuid' => 'agent_IsxxxxSf_60EhxxxxMGbz-Rxxg',
'phone_number' => '9876543210',
'country_code' => 'IN',
'system_prompt' => 'You are calling to confirm the appointment scheduled for tomorrow at 10 AM.',
'webhook_url' => 'https://yourdomain.com/osvi-webhook',
'person_name' => 'John Doe',
'additional_data' => [
'appointment_date' => '2025-01-15',
'product_name' => 'Premium Plan'
],
'initial_greeting' => 'Hello John, this is a reminder about your appointment tomorrow at 10 AM.',
'call_config_overrides' => [
'max_call_duration_seconds' => 300,
'enable_callback' => false,
'retry_config' => [
'enabled' => true,
'max_attempts' => 2,
'interval_minutes' => 30
]
],
'data_extraction' => [
[
'key' => 'appointment_confirmed',
'description' => 'Ask if they can confirm their appointment for tomorrow at 10 AM.',
'required' => true,
'output_format' => 'yes or no'
],
[
'key' => 'reschedule_preference',
'description' => 'If they cannot make it, ask what date and time works better.',
'required' => false,
'output_format' => 'date and time'
]
],
'scheduled_at' => '2026-09-12T11:00:00+05:30'
]),
CURLOPT_HTTPHEADER => [
"API-Token: <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.osvi.ai/call"
payload := strings.NewReader("{\n \"agent_uuid\": \"agent_IsxxxxSf_60EhxxxxMGbz-Rxxg\",\n \"phone_number\": \"9876543210\",\n \"country_code\": \"IN\",\n \"system_prompt\": \"You are calling to confirm the appointment scheduled for tomorrow at 10 AM.\",\n \"webhook_url\": \"https://yourdomain.com/osvi-webhook\",\n \"person_name\": \"John Doe\",\n \"additional_data\": {\n \"appointment_date\": \"2025-01-15\",\n \"product_name\": \"Premium Plan\"\n },\n \"initial_greeting\": \"Hello John, this is a reminder about your appointment tomorrow at 10 AM.\",\n \"call_config_overrides\": {\n \"max_call_duration_seconds\": 300,\n \"enable_callback\": false,\n \"retry_config\": {\n \"enabled\": true,\n \"max_attempts\": 2,\n \"interval_minutes\": 30\n }\n },\n \"data_extraction\": [\n {\n \"key\": \"appointment_confirmed\",\n \"description\": \"Ask if they can confirm their appointment for tomorrow at 10 AM.\",\n \"required\": true,\n \"output_format\": \"yes or no\"\n },\n {\n \"key\": \"reschedule_preference\",\n \"description\": \"If they cannot make it, ask what date and time works better.\",\n \"required\": false,\n \"output_format\": \"date and time\"\n }\n ],\n \"scheduled_at\": \"2026-09-12T11:00:00+05:30\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("API-Token", "<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.osvi.ai/call")
.header("API-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"agent_uuid\": \"agent_IsxxxxSf_60EhxxxxMGbz-Rxxg\",\n \"phone_number\": \"9876543210\",\n \"country_code\": \"IN\",\n \"system_prompt\": \"You are calling to confirm the appointment scheduled for tomorrow at 10 AM.\",\n \"webhook_url\": \"https://yourdomain.com/osvi-webhook\",\n \"person_name\": \"John Doe\",\n \"additional_data\": {\n \"appointment_date\": \"2025-01-15\",\n \"product_name\": \"Premium Plan\"\n },\n \"initial_greeting\": \"Hello John, this is a reminder about your appointment tomorrow at 10 AM.\",\n \"call_config_overrides\": {\n \"max_call_duration_seconds\": 300,\n \"enable_callback\": false,\n \"retry_config\": {\n \"enabled\": true,\n \"max_attempts\": 2,\n \"interval_minutes\": 30\n }\n },\n \"data_extraction\": [\n {\n \"key\": \"appointment_confirmed\",\n \"description\": \"Ask if they can confirm their appointment for tomorrow at 10 AM.\",\n \"required\": true,\n \"output_format\": \"yes or no\"\n },\n {\n \"key\": \"reschedule_preference\",\n \"description\": \"If they cannot make it, ask what date and time works better.\",\n \"required\": false,\n \"output_format\": \"date and time\"\n }\n ],\n \"scheduled_at\": \"2026-09-12T11:00:00+05:30\"\n}")
.asString();
require 'uri'
require 'net/http'
url = URI("https://api.osvi.ai/call")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"agent_uuid\": \"agent_IsxxxxSf_60EhxxxxMGbz-Rxxg\",\n \"phone_number\": \"9876543210\",\n \"country_code\": \"IN\",\n \"system_prompt\": \"You are calling to confirm the appointment scheduled for tomorrow at 10 AM.\",\n \"webhook_url\": \"https://yourdomain.com/osvi-webhook\",\n \"person_name\": \"John Doe\",\n \"additional_data\": {\n \"appointment_date\": \"2025-01-15\",\n \"product_name\": \"Premium Plan\"\n },\n \"initial_greeting\": \"Hello John, this is a reminder about your appointment tomorrow at 10 AM.\",\n \"call_config_overrides\": {\n \"max_call_duration_seconds\": 300,\n \"enable_callback\": false,\n \"retry_config\": {\n \"enabled\": true,\n \"max_attempts\": 2,\n \"interval_minutes\": 30\n }\n },\n \"data_extraction\": [\n {\n \"key\": \"appointment_confirmed\",\n \"description\": \"Ask if they can confirm their appointment for tomorrow at 10 AM.\",\n \"required\": true,\n \"output_format\": \"yes or no\"\n },\n {\n \"key\": \"reschedule_preference\",\n \"description\": \"If they cannot make it, ask what date and time works better.\",\n \"required\": false,\n \"output_format\": \"date and time\"\n }\n ],\n \"scheduled_at\": \"2026-09-12T11:00:00+05:30\"\n}"
response = http.request(request)
puts response.read_body
{
"success": false,
"error": "webhook_url is set but post_call_analysis is not enabled on this agent",
"details": null
}
{
"success": false,
"error": "Invalid API token"
}
{
"success": false,
"error": "Agent not found or not associated with this account",
"details": null
}
{
"success": false,
"error": "No phone number is attached to this agent. Attach an outbound number under Agent → Telephony before placing calls.",
"details": {
"error_code": "NO_OUTBOUND_NUMBER_CONFIGURED",
"action": "attach_number"
}
}
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Osvi AI Docs","colors":{"primary":"#1447e6","light":"#477cfd","dark":"#1447e6"},"logo":"https://mintcdn.com/osviai/72IncIb9hk2inxpP/logo/logo-osvi.png?fit=max\u0026auto=format\u0026n=72IncIb9hk2inxpP\u0026q=85\u0026s=258868231c43cb5d7f6f971ef2fa6ea0","favicon":"https://mintcdn.com/osviai/72IncIb9hk2inxpP/logo/logo-osvi.png?fit=max\u0026auto=format\u0026n=72IncIb9hk2inxpP\u0026q=85\u0026s=258868231c43cb5d7f6f971ef2fa6ea0","navbar":{"links":[{"href":"https://osvi.ai/blogs","label":"Blog"},{"href":"mailto:support@osvi.ai","label":"Support"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.osvi.ai"}},"footer":{"socials":{"x":"https://x.com/osvi_ai","linkedin":"https://linkedin.com/company/osvi-ai"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"osviai","hasAudioNarration":false,"actualSubdomain":"osviai","customDomains":["docs.osvi.ai"],"gitSource":{"type":"github","owner":"facitoo","repo":"docs","deployBranch":"main","isPrivate":true,"contentDirectory":"","mountPath":"","label":""},"entitlements":{},"buildId":"6af5aebe51057243856fe4fb","clientVersion":"0.0.4143","searchFilterCounts":[{"language":"default","tag":"API Reference","count":32},{"language":"default","tag":"Get Started","count":22},{"language":"default","tag":"Going Deeper","count":22},{"language":"default","tag":"Chat SDK","count":18},{"language":"default","tag":"Quick Guide","count":18},{"language":"default","tag":"Chat","count":11},{"language":"default","tag":"Agent Configuration","count":7},{"language":"default","tag":"Calling","count":6},{"language":"default","tag":"Legacy","count":5},{"language":"default","tag":"Telephony","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[{"filePath":"style.css","content":".max-w-8xl{max-width:100%!important}#sidebar,#navigation-items{padding-left:1.25rem}#table-of-contents{padding-right:1.25rem}#content-area{max-width:62rem}@media (min-width: 1800px){#content-area{max-width:70rem}}"}],"page":{"pagePath":"api-reference/endpoint/call","slug":"/api-reference/endpoint/call","pageMetadata":{"title":"Initiate a Phone Call","openapi":"POST /call","description":"**Legacy — will be deprecated soon. Use the [versioned endpoint](/api-reference/endpoint/call_v1) (`POST /v1/call`) for new integrations.**\n\nStarts an outbound phone call to the given number using the specified agent. The call is placed asynchronously — use `webhook_url` to receive a notification when the call completes. The request and response contract is identical to `POST /v1/call`.\n\nTo place the call later instead, pass `scheduled_at` as a 24-hour IST time (`11:00`) or ISO 8601 with offset (`2026-09-12T11:00:00+05:30`). The response returns immediately with the `call_id` the webhook will carry once the call is placed.","href":"/api-reference/endpoint/call"},"description":{"compiledSource":"\"use strict\";\nconst {Fragment: _Fragment, jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n a: \"a\",\n code: \"code\",\n p: \"p\",\n strong: \"strong\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_Fragment, {\n children: [_jsx(_components.p, {\n children: _jsxs(_components.strong, {\n children: [\"Legacy — will be deprecated soon. Use the \", _jsx(_components.a, {\n href: \"/api-reference/endpoint/call_v1\",\n children: \"versioned endpoint\"\n }), \" (\", _jsx(_components.code, {\n children: \"POST /v1/call\"\n }), \") for new integrations.\"]\n })\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"Starts an outbound phone call to the given number using the specified agent. The call is placed asynchronously — use \", _jsx(_components.code, {\n children: \"webhook_url\"\n }), \" to receive a notification when the call completes. The request and response contract is identical to \", _jsx(_components.code, {\n children: \"POST /v1/call\"\n }), \".\"]\n }), \"\\n\", _jsxs(_components.p, {\n children: [\"To place the call later instead, pass \", _jsx(_components.code, {\n children: \"scheduled_at\"\n }), \" as a 24-hour IST time (\", _jsx(_components.code, {\n children: \"11:00\"\n }), \") or ISO 8601 with offset (\", _jsx(_components.code, {\n children: \"2026-09-12T11:00:00+05:30\"\n }), \"). The response returns immediately with the \", _jsx(_components.code, {\n children: \"call_id\"\n }), \" the webhook will carry once the call is placed.\"]\n })]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Initiate a Phone Call","openapi":"POST /call","description":"**Legacy — will be deprecated soon. Use the [versioned endpoint](/api-reference/endpoint/call_v1) (`POST /v1/call`) for new integrations.**\n\nStarts an outbound phone call to the given number using the specified agent. The call is placed asynchronously — use `webhook_url` to receive a notification when the call completes. The request and response contract is identical to `POST /v1/call`.\n\nTo place the call later instead, pass `scheduled_at` as a 24-hour IST time (`11:00`) or ISO 8601 with offset (`2026-09-12T11:00:00+05:30`). The response returns immediately with the `call_id` the webhook will carry once the call is placed.","href":"/api-reference/endpoint/call"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/_mintlify/custom/osviai/f45447a69f2134a5/osvi-chat.js"],"openApiReferenceData":{"operation":{"summary":"Initiate a phone call","deprecated":true,"description":"**Legacy — will be deprecated soon. Use the [versioned endpoint](/api-reference/endpoint/call_v1) (`POST /v1/call`) for new integrations.**\n\nStarts an outbound phone call to the given number using the specified agent. The call is placed asynchronously — use `webhook_url` to receive a notification when the call completes. The request and response contract is identical to `POST /v1/call`.\n\nTo place the call later instead, pass `scheduled_at` as a 24-hour IST time (`11:00`) or ISO 8601 with offset (`2026-09-12T11:00:00+05:30`). The response returns immediately with the `call_id` the webhook will carry once the call is placed.","requestBody":"f57972cc-4d5e-48ce-9450-4582f8cac743","responses":{"200":"1f3771d9-cfbd-4a4d-8d55-1974e93fd147","400":"8842bf8a-8e40-4d8c-91c6-6e68ac488095","401":"34b60a46-b036-4f47-b40e-bb45d5737c3e","403":"41ec5f2c-6f26-463a-a29c-2071256f4a08","422":"04f853b6-5d30-4309-a5f7-c01b32e4f540"},"method":"post","type":"path","servers":["848d64f9-177f-43a2-a437-6591c8c620ad"],"security":["2e46a68a-ab89-4492-a628-60de26359c15"],"path":"/call","baseUrlOptions":["https://api.osvi.ai"],"title":"Initiate a phone call","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["agent_uuid","phone_number","country_code"],"properties":{"agent_uuid":{"type":"string","description":"Unique identifier of the OSVI agent that will handle the call. Must belong to the account that owns the API token, otherwise the request is rejected with `403 Forbidden`.","example":"agent_IsxxxxSf_60EhxxxxMGbz-Rxxg","isRequired":true,"uniqueKey":"agent_uuid","typeLabel":"string"},"phone_number":{"type":"string","description":"Destination phone number (digits only, without country code). Normalized and validated against `country_code`; an implausible number returns `400 Bad Request`.","example":"9876543210","isRequired":true,"uniqueKey":"phone_number","typeLabel":"string"},"country_code":{"type":"string","description":"ISO 3166-1 alpha-2 country code of the destination number. Must be a recognized country code, otherwise the request is rejected with `400 Bad Request`.","example":"IN","isRequired":true,"uniqueKey":"country_code","typeLabel":"string"},"system_prompt":{"type":"string","description":"Optional runtime override for the agent's system prompt for this call only.","example":"You are calling to confirm the appointment scheduled for tomorrow at 10 AM.","uniqueKey":"system_prompt","typeLabel":"string"},"webhook_url":{"type":"string","format":"uri","description":"URL that OSVI will POST to when the call completes. Must be a valid HTTP or HTTPS URL that includes a host. The payload matches the webhook schema documented in the Webhooks section.","example":"https://yourdomain.com/osvi-webhook","uniqueKey":"webhook_url","typeLabel":"string\u003curi>"},"person_name":{"type":"string","description":"Name of the person being called. Made available to the agent during the call.","example":"John Doe","uniqueKey":"person_name","typeLabel":"string"},"additional_data":{"type":"object","additionalProperties":true,"description":"Arbitrary key-value object passed to the agent at runtime. Use this to provide context the agent can reference during the conversation. Must be a JSON object — arrays or scalar values are rejected with `400 Bad Request`.","example":{"appointment_date":"2025-01-15","product_name":"Premium Plan"},"uniqueKey":"additional_data","typeLabel":"object"},"initial_greeting":{"type":"string","maxLength":2000,"description":"Opening line the agent speaks when the call connects. Maximum 2000 characters.","example":"Hello John, this is a reminder about your appointment tomorrow at 10 AM.","uniqueKey":"initial_greeting","typeLabel":"string"},"call_config_overrides":{"type":"object","description":"Per-call overrides for call behavior. All fields are optional.","properties":{"max_call_duration_seconds":{"type":"integer","minimum":30,"maximum":1800,"description":"Hard limit on the call length in seconds. Must be between 30 and 1800 (30 minutes).","example":300,"uniqueKey":"call_config_overrides.max_call_duration_seconds","typeLabel":"integer"},"enable_callback":{"type":"boolean","description":"Whether the contact may trigger a callback for this call.","example":false,"uniqueKey":"call_config_overrides.enable_callback","typeLabel":"boolean"},"retry_config":{"type":"object","description":"Controls automatic retries when the call is not answered.","properties":{"enabled":{"type":"boolean","description":"Whether automatic retries are enabled.","example":true,"uniqueKey":"call_config_overrides.retry_config.enabled","typeLabel":"boolean"},"max_attempts":{"type":"integer","minimum":1,"maximum":10,"description":"Maximum number of retry attempts. Must be between 1 and 10.","example":2,"uniqueKey":"call_config_overrides.retry_config.max_attempts","typeLabel":"integer"},"interval_minutes":{"type":"integer","minimum":1,"maximum":1440,"description":"Minutes to wait between retry attempts. Must be between 1 and 1440 (24 hours).","example":30,"uniqueKey":"call_config_overrides.retry_config.interval_minutes","typeLabel":"integer"}},"uniqueKey":"call_config_overrides.retry_config","typeLabel":"object"}},"example":{"max_call_duration_seconds":300,"enable_callback":false,"retry_config":{"enabled":true,"max_attempts":2,"interval_minutes":30}},"uniqueKey":"call_config_overrides","typeLabel":"object"},"data_extraction":{"type":"array","description":"List of data points the agent should attempt to extract during the conversation. Must be an array; each item requires a non-empty `description`.","items":{"type":"object","required":["description"],"properties":{"description":{"type":"string","description":"Instruction describing what the agent should ask or extract. Required for every item.","example":"Ask if they can confirm their appointment for tomorrow at 10 AM.","isRequired":true,"uniqueKey":"data_extraction.items.[INDEX].description","typeLabel":"string"},"key":{"type":"string","description":"Identifier under which the extracted value is returned.","example":"appointment_confirmed","uniqueKey":"data_extraction.items.[INDEX].key","typeLabel":"string"},"required":{"type":"boolean","description":"Whether this data point must be collected for the call to be considered successful.","example":true,"uniqueKey":"data_extraction.items.[INDEX].required","typeLabel":"boolean"},"output_format":{"type":"string","description":"Expected format of the extracted value.","example":"yes or no","uniqueKey":"data_extraction.items.[INDEX].output_format","typeLabel":"string"}},"uniqueKey":"data_extraction.items.[INDEX]","typeLabel":"object"},"example":[{"key":"appointment_confirmed","description":"Ask if they can confirm their appointment for tomorrow at 10 AM.","required":true,"output_format":"yes or no"},{"key":"reschedule_preference","description":"If they cannot make it, ask what date and time works better.","required":false,"output_format":"date and time"}],"uniqueKey":"data_extraction","typeLabel":"object[]"},"scheduled_at":{"type":"string","description":"Optional. When set, the call is queued and placed at this time instead of immediately. A string in **24-hour** format, in one of two shapes:\n\n- `HH:MM` — a time in IST (Asia/Kolkata). Placed today at that time if it is still ahead, otherwise tomorrow at that time. Example: `11:00`.\n- `YYYY-MM-DDTHH:MM:SS+05:30` — ISO 8601 with an explicit UTC offset, used exactly as given. Use this for a specific date, or for a zone other than IST. Seconds are required, fractional seconds are accepted (`2026-09-12T05:30:00.000Z`, as JavaScript's `toISOString()` emits), and the offset may be `Z`, `±HH:MM` or `±HHMM` up to ±14:00. Example: `2026-09-12T11:00:00+05:30`.\n\nMust be in the future and at most 90 days ahead. Rejected with `400 Bad Request`: Unix timestamps, 12-hour clocks (`11 am`), date-times without an offset, and any out-of-range field (`12:60`, `25:00`, `+15:00`, an invalid calendar date). Nothing is normalised silently.\n\nCalls scheduled for the same moment start together up to the agent's concurrency limit and the rest follow as slots free up. The agent's campaign calling window still applies. All other fields behave exactly as for an immediate call.","example":"2026-09-12T11:00:00+05:30","uniqueKey":"scheduled_at","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"agent_uuid":"agent_IsxxxxSf_60EhxxxxMGbz-Rxxg","phone_number":"9876543210","country_code":"IN","system_prompt":"You are calling to confirm the appointment scheduled for tomorrow at 10 AM.","webhook_url":"https://yourdomain.com/osvi-webhook","person_name":"John Doe","additional_data":{"appointment_date":"2025-01-15","product_name":"Premium Plan"},"initial_greeting":"Hello John, this is a reminder about your appointment tomorrow at 10 AM.","call_config_overrides":{"max_call_duration_seconds":300,"enable_callback":false,"retry_config":{"enabled":true,"max_attempts":2,"interval_minutes":30}},"data_extraction":[{"key":"appointment_confirmed","description":"Ask if they can confirm their appointment for tomorrow at 10 AM.","required":true,"output_format":"yes or no"},{"key":"reschedule_preference","description":"If they cannot make it, ask what date and time works better.","required":false,"output_format":"date and time"}],"scheduled_at":"2026-09-12T11:00:00+05:30"}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"1f3771d9-cfbd-4a4d-8d55-1974e93fd147":{"description":"Call initiated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":true,"uniqueKey":"success","typeLabel":"boolean"},"data":{"type":"object","properties":{"call_id":{"type":"string","description":"Unique identifier for this call. Included in the webhook payload on completion.","example":"call_abc123xyz","uniqueKey":"data.call_id","typeLabel":"string"},"scheduled_at":{"type":"string","description":"Only present when the call was scheduled. The resolved time the call will be placed, as ISO 8601 with UTC offset.","example":"2026-09-12T11:00:00+05:30","uniqueKey":"data.scheduled_at","typeLabel":"string"},"scheduled_at_epoch":{"type":"integer","description":"Only present when the call was scheduled. The same instant as a Unix timestamp in seconds.","example":1789191000,"uniqueKey":"data.scheduled_at_epoch","typeLabel":"integer"}},"uniqueKey":"data","typeLabel":"object"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"data":{"call_id":"call_abc123xyz","scheduled_at":"2026-09-12T11:00:00+05:30","scheduled_at_epoch":1789191000}}}},"exampleType":"generated"}},"exampleType":"generated"},"8842bf8a-8e40-4d8c-91c6-6e68ac488095":{"description":"Validation error — a required field is missing or a field failed validation (e.g. invalid `country_code`, implausible `phone_number`, `initial_greeting` over 2000 characters, out-of-range `call_config_overrides` values, a `data_extraction` item missing `description`, or `webhook_url` is set but Post-Call Analysis is not enabled on the agent).","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"max_call_duration_seconds must be between 30 and 1800","uniqueKey":"error","typeLabel":"string"},"details":{"oneOf":[{"type":"object","example":null,"uniqueKey":"details.oneOf.0","typeLabel":"object"},{"type":"null","example":null,"uniqueKey":"details.oneOf.1","typeLabel":"null"}],"uniqueKey":"details","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"error":"webhook_url is set but post_call_analysis is not enabled on this agent","details":null},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"webhook_url is set but post_call_analysis is not enabled on this agent","details":null}}},"exampleType":"examples"}},"exampleType":"examples"},"34b60a46-b036-4f47-b40e-bb45d5737c3e":{"description":"Invalid or missing API token","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"Invalid API token","uniqueKey":"error","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Invalid API token"}}},"exampleType":"generated"}},"exampleType":"generated"},"41ec5f2c-6f26-463a-a29c-2071256f4a08":{"description":"The agent does not exist or is not associated with the authenticated account.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"Agent not found or not associated with this account","uniqueKey":"error","typeLabel":"string"},"details":{"oneOf":[{"type":"object","example":null,"uniqueKey":"details.oneOf.0","typeLabel":"object"},{"type":"null","example":null,"uniqueKey":"details.oneOf.1","typeLabel":"null"}],"uniqueKey":"details","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"Agent not found or not associated with this account","details":null}}},"exampleType":"generated"}},"exampleType":"generated"},"04f853b6-5d30-4309-a5f7-c01b32e4f540":{"description":"The agent cannot place outbound calls right now. `details.error_code` identifies the cause and `details.action` names the fix:\n\n| `error_code` | Cause | `action` |\n| --- | --- | --- |\n| `NO_OUTBOUND_NUMBER_CONFIGURED` | No phone number is attached to the agent. | `attach_number` |\n| `OUTBOUND_TRUNK_REATTACH_REQUIRED` | Every attached number's telephony connection is broken and needs to be re-attached with its SIP password. | `reattach_number` |\n| `OUTBOUND_TRUNK_INACTIVE` | An attached number exists but is deactivated. | `reactivate_number` |","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","example":false,"uniqueKey":"success","typeLabel":"boolean"},"error":{"type":"string","example":"max_call_duration_seconds must be between 30 and 1800","uniqueKey":"error","typeLabel":"string"},"details":{"oneOf":[{"type":"object","example":null,"uniqueKey":"details.oneOf.0","typeLabel":"object"},{"type":"null","example":null,"uniqueKey":"details.oneOf.1","typeLabel":"null"}],"uniqueKey":"details","typeLabel":"object | null"}},"uniqueKey":"","typeLabel":"object"},"example":{"success":false,"error":"No phone number is attached to this agent. Attach an outbound number under Agent → Telephony before placing calls.","details":{"error_code":"NO_OUTBOUND_NUMBER_CONFIGURED","action":"attach_number"}},"examples":{"Example":{"title":"Example","value":{"success":false,"error":"No phone number is attached to this agent. Attach an outbound number under Agent → Telephony before placing calls.","details":{"error_code":"NO_OUTBOUND_NUMBER_CONFIGURED","action":"attach_number"}}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"2e46a68a-ab89-4492-a628-60de26359c15":{"ApiToken":{"type":"apiKey","in":"header","name":"API-Token","description":"16-character API token associated with your OSVI account. Find it in your dashboard under Settings → API.","scopes":[],"schemeName":"ApiToken"}}},"servers":{"848d64f9-177f-43a2-a437-6591c8c620ad":{"url":"https://api.osvi.ai"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"API-Token","description":"16-character API token associated with your OSVI account. Find it in your dashboard under Settings → API.","scopes":[],"schemeName":"ApiToken"},"schema":{"title":"API-Token","type":"string","description":"16-character API token associated with your OSVI account. Find it in your dashboard under Settings → API.","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiToken","name":"API-Token"}],"title":"ApiToken"}]},"originalFileLocation":"api-reference/openapi.json"},"subdomain":"osviai","siteName":"Osvi AI Docs","title":"Initiate a Phone Call - Osvi AI Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-11T18:41:46.932Z","originalFileLocation":"api-reference/endpoint/call.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Legacy — will be deprecated soon. Use the versioned endpoint (POST /v1/call) for new integrations. Starts an outbound phone call to the given number using the specified agent. The call is placed asynchronously — use webhook_url to receive a notification when the call completes. The request and response contract is identical to POST /v1/call. To place the call later instead, pass scheduled_at as a 24-hour IST time (11:00) or ISO 8601 with offset (2026-09-12T11:00:00+05:30). The response returns immediately with the call_id the webhook will carry once the call is placed.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Osvi AI Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/osviai/50HVWe9WvPwWZKUz/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/osviai/50HVWe9WvPwWZKUz/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/osviai/50HVWe9WvPwWZKUz/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/osviai/50HVWe9WvPwWZKUz/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/osviai/50HVWe9WvPwWZKUz/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/osviai/50HVWe9WvPwWZKUz/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/osviai/50HVWe9WvPwWZKUz/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/osviai/50HVWe9WvPwWZKUz/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/osviai/50HVWe9WvPwWZKUz/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Initiate a Phone Call - Osvi AI Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Legacy — will be deprecated soon. Use the versioned endpoint (POST /v1/call) for new integrations. Starts an outbound phone call to the given number using the specified agent. The call is placed asynchronously — use webhook_url to receive a notification when the call completes. The request and response contract is identical to POST /v1/call. To place the call later instead, pass scheduled_at as a 24-hour IST time (11:00) or ISO 8601 with offset (2026-09-12T11:00:00+05:30). The response returns immediately with the call_id the webhook will carry once the call is placed.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Osvi AI Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.osvi.ai/api-reference/endpoint/call\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://osviai.mintlify.site/_mintlify/api/og/v2?division=Legacy\u0026amp;title=Initiate+a+Phone+Call\u0026amp;description=**Legacy+%E2%80%94+will+be+deprecated+soon.+Use+the+%5Bversioned+endpoint%5D%28%2Fapi-reference%2Fendpoint%2Fcall_v1%29+%28%60POST+%2Fv1%2Fcall%60%29+for+new+integrations.**%0A%0AStarts+an+outbound+\u0026amp;theme=c6bf7d01931ced18fb6116cb\u0026amp;signature=29da79975ec472c15f59c87556750ce484f2c4a8dee9fef5b5eb3458adee0919\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Initiate a Phone Call - Osvi AI Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Legacy — will be deprecated soon. Use the versioned endpoint (POST /v1/call) for new integrations. Starts an outbound phone call to the given number using the specified agent. The call is placed asynchronously — use webhook_url to receive a notification when the call completes. The request and response contract is identical to POST /v1/call. To place the call later instead, pass scheduled_at as a 24-hour IST time (11:00) or ISO 8601 with offset (2026-09-12T11:00:00+05:30). The response returns immediately with the call_id the webhook will carry once the call is placed.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://osviai.mintlify.site/_mintlify/api/og/v2?division=Legacy\u0026amp;title=Initiate+a+Phone+Call\u0026amp;description=**Legacy+%E2%80%94+will+be+deprecated+soon.+Use+the+%5Bversioned+endpoint%5D%28%2Fapi-reference%2Fendpoint%2Fcall_v1%29+%28%60POST+%2Fv1%2Fcall%60%29+for+new+integrations.**%0A%0AStarts+an+outbound+\u0026amp;theme=c6bf7d01931ced18fb6116cb\u0026amp;signature=29da79975ec472c15f59c87556750ce484f2c4a8dee9fef5b5eb3458adee0919\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/osviai/50HVWe9WvPwWZKUz/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Osvi AI Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#1447e6\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.osvi.ai/api-reference/endpoint/call\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/endpoint/call.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.osvi.ai/#organization\",\"name\":\"Osvi AI Docs\",\"url\":\"https://docs.osvi.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/osviai/72IncIb9hk2inxpP/logo/logo-osvi.png?fit=max\u0026auto=format\u0026n=72IncIb9hk2inxpP\u0026q=85\u0026s=258868231c43cb5d7f6f971ef2fa6ea0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.osvi.ai#website\",\"name\":\"Osvi AI Docs\",\"url\":\"https://docs.osvi.ai\",\"publisher\":{\"@id\":\"https://docs.osvi.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.osvi.ai/api-reference/endpoint/call#webpage\",\"url\":\"https://docs.osvi.ai/api-reference/endpoint/call\",\"name\":\"Initiate a Phone Call\",\"description\":\"Legacy — will be deprecated soon. Use the versioned endpoint (POST /v1/call) for new integrations. Starts an outbound phone call to the given number using the specified agent. The call is placed asynchronously — use webhook_url to receive a notification when the call completes. The request and response contract is identical to POST /v1/call. To place the call later instead, pass scheduled_at as a 24-hour IST time (11:00) or ISO 8601 with offset (2026-09-12T11:00:00+05:30). The response returns immediately with the call_id the webhook will carry once the call is placed.\",\"dateModified\":\"2026-09-11T18:41:46.932Z\",\"isPartOf\":{\"@id\":\"https://docs.osvi.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.osvi.ai/api-reference/endpoint/call#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.osvi.ai/api-reference/endpoint/call#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://docs.osvi.ai/api-reference/introduction\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Initiate a Phone Call\",\"item\":\"https://docs.osvi.ai/api-reference/endpoint/call\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.osvi.ai/api-reference/endpoint/call#apireference\",\"headline\":\"Initiate a Phone Call\",\"name\":\"Initiate a Phone Call\",\"description\":\"Legacy — will be deprecated soon. Use the versioned endpoint (POST /v1/call) for new integrations. Starts an outbound phone call to the given number using the specified agent. The call is placed asynchronously — use webhook_url to receive a notification when the call completes. The request and response contract is identical to POST /v1/call. To place the call later instead, pass scheduled_at as a 24-hour IST time (11:00) or ISO 8601 with offset (2026-09-12T11:00:00+05:30). The response returns immediately with the call_id the webhook will carry once the call is placed.\",\"url\":\"https://docs.osvi.ai/api-reference/endpoint/call\",\"mainEntityOfPage\":{\"@id\":\"https://docs.osvi.ai/api-reference/endpoint/call#webpage\"},\"dateModified\":\"2026-09-11T18:41:46.932Z\",\"publisher\":{\"@id\":\"https://docs.osvi.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.osvi.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Osvi AI Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Osvi AI Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/endpoint/call.md","siteName":"Osvi AI Docs","nav":{"global":null,"groups":[{"group":"Get Started","pages":[{"group":"Overview","icon":"compass","pages":[{"title":"Welcome to Osvi","sidebarTitle":"Welcome to Osvi","href":"/index"},{"title":"Platform Overview","sidebarTitle":"How Osvi Works","href":"/platform/overview"},{"title":"Quickstart","sidebarTitle":"Quickstart","href":"/quickstart"},{"title":"Changelog","href":"/changelog"}]},{"group":"Quick Guide","icon":"screen-users","pages":[{"title":"Building an Agent","sidebarTitle":"Create an Agent","href":"/platform/agents"},{"title":"Versions and Going Live","sidebarTitle":"Versions \u0026 Going Live","href":"/platform/agent-versions"},{"title":"Starting a Build","sidebarTitle":"Build with Conductor","href":"/platform/conductor-build"},{"title":"Models and Speech","sidebarTitle":"Configure Voice \u0026 Speech","href":"/platform/advanced"},{"title":"Tools Overview","sidebarTitle":"Add Tools","href":"/platform/tools"},{"title":"Integrations","href":"/platform/integrations"},{"title":"Knowledge Base","sidebarTitle":"Setup Knowledge Base","href":"/platform/knowledge-base"},{"title":"Campaigns","sidebarTitle":"Create a Campaign","href":"/platform/campaigns"},{"title":"Workflow Campaigns","sidebarTitle":"Workflows","href":"/platform/workflows"},{"title":"Phone Numbers","sidebarTitle":"Manage Numbers","href":"/platform/phone-numbers"},{"title":"Test Agent Before You Deploy","sidebarTitle":"Run Evals","href":"/platform/evals"},{"title":"Conversations","sidebarTitle":"View Call History","href":"/platform/conversations"},{"title":"Scheduled Conversations","sidebarTitle":"Scheduled","href":"/platform/scheduled-conversations"},{"title":"Call Analysis","sidebarTitle":"Analyse Calls","href":"/platform/call-analysis"},{"title":"Export Reports","sidebarTitle":"Export Reports","href":"/platform/exports"},{"title":"Analytics","href":"/platform/analytics"},{"title":"Workspace","sidebarTitle":"Workspace Settings","href":"/platform/team-management"},{"title":"Concurrency","href":"/platform/concurrency"}]}]},{"group":"Going Deeper","pages":[{"group":"Agent Configuration","icon":"robot","pages":[{"title":"Prompt Writing Guidelines","href":"/platform/prompt-writing"},{"title":"Call Settings","href":"/platform/call-settings"},{"title":"Voices","href":"/platform/voices"},{"title":"Memory","href":"/platform/memory"},{"title":"Chat Agents","href":"/platform/chat-agents"},{"title":"Channel Variables","href":"/platform/channel-variables"},{"title":"Public Chat Links","href":"/platform/public-chat"}]},{"group":"Tools","icon":"screwdriver-wrench","pages":[{"title":"System Tools","href":"/platform/tools-system"},{"title":"Custom Tools","href":"/platform/tools-custom"}]},{"group":"Conductor","icon":"wand-magic-sparkles","root":{"title":"Overview","href":"/platform/conductor"},"pages":[{"title":"Reviewing and Creating","href":"/platform/conductor-create"},{"title":"Refining an Agent","href":"/platform/conductor-refine"}]},{"group":"Journeys","icon":"route","root":{"title":"Overview","href":"/platform/journeys"},"pages":[{"title":"Building a Journey","sidebarTitle":"Build a Journey","href":"/platform/journeys-building"},{"title":"Triggers \u0026 Enrollment","sidebarTitle":"Triggers \u0026 Enrollment","href":"/platform/journeys-triggers"},{"title":"Monitoring \u0026 Testing","sidebarTitle":"Monitoring \u0026 Testing","href":"/platform/journeys-runs"}]},{"group":"Evals","icon":"flask","pages":[{"title":"Writing Scenarios","href":"/platform/evals-scenarios"},{"title":"Running Batches","href":"/platform/evals-batches"},{"title":"Reading Results","href":"/platform/evals-results"}]},{"group":"Telephony","icon":"tower-cell","root":{"title":"Choosing an integration","href":"/platform/telephony-overview"},"pages":[{"title":"Plivo Integration","href":"/plivo-integration"},{"title":"Ozonetel Integration","href":"/ozontel-integration"},{"title":"Exotel Integration","href":"/exotel-integration"},{"title":"Vobiz Integration","href":"/vobiz-integration"},{"title":"WhatsApp Business Calling","href":"/platform/whatsapp-channels"}]}]},{"group":"Chat SDK","pages":[{"title":"Chat SDK overview","sidebarTitle":"Overview","href":"/website-chat/overview"},{"title":"Add chat to your website","sidebarTitle":"Quickstart","href":"/website-chat/quickstart"},{"group":"Set up","pages":[{"title":"Dashboard settings","href":"/website-chat/dashboard-settings"},{"title":"Files from visitors","sidebarTitle":"Files from visitors","href":"/website-chat/attachments"},{"title":"Customise the widget","sidebarTitle":"Customise","href":"/website-chat/customise"},{"title":"Chat for logged-in users","sidebarTitle":"Logged-in users","href":"/website-chat/server-mode"}]},{"group":"Build your own UI","pages":[{"title":"Inline panel and frameworks","sidebarTitle":"Inline panel","href":"/website-chat/inline"},{"title":"Headless chat SDK","sidebarTitle":"Headless SDK","href":"/website-chat/headless"}]},{"group":"Flutter","pages":[{"title":"Add chat to your Flutter app","sidebarTitle":"Quickstart","href":"/flutter/quickstart"},{"title":"Customise the Flutter chat","sidebarTitle":"Customise","href":"/flutter/customise"},{"title":"Flutter chat for logged-in users","sidebarTitle":"Logged-in users","href":"/flutter/server-mode"},{"title":"Flutter headless client","sidebarTitle":"Headless client","href":"/flutter/headless"}]},{"group":"Go live","pages":[{"title":"Security and limits","sidebarTitle":"Security and limits","href":"/website-chat/security"},{"title":"Production setup","href":"/website-chat/production"},{"title":"Troubleshooting the chat SDK","sidebarTitle":"Troubleshooting","href":"/website-chat/troubleshooting"}]},{"group":"Reference","pages":[{"title":"Configuration reference","sidebarTitle":"Configuration","href":"/website-chat/configuration"},{"title":"Error codes","href":"/website-chat/error-codes"},{"title":"Release notes","href":"/website-chat/release-notes"}]}]},{"group":"API Reference","pages":[{"title":"Introduction","href":"/api-reference/introduction"},{"title":"WebSocket Integration","href":"/api-reference/chat-websocket"},{"group":"Calling","icon":"phone","pages":[{"title":"Initiate a Phone Call","openapi":"POST /v1/call","href":"/api-reference/endpoint/call_v1"},{"title":"List Calls","openapi":"GET /v1/calls","href":"/api-reference/endpoint/list_calls"},{"title":"Get a Call","openapi":"GET /v1/call/{id}","href":"/api-reference/endpoint/get_call"},{"title":"Get Call Transcript","openapi":"GET /v1/call/{id}/transcript","href":"/api-reference/endpoint/call_transcript"},{"title":"Get Call Recording","openapi":"GET /v1/call/{id}/recording","href":"/api-reference/endpoint/call_recording"},{"title":"List Active Agents","openapi":"GET /v1/active_agents","href":"/api-reference/endpoint/active_agents"}]},{"group":"Campaigns","icon":"list-ol","pages":[{"title":"Add Campaign Contacts","openapi":"POST /v1/campaigns/{id}/contacts","href":"/api-reference/endpoint/campaign_add_contacts"},{"title":"Get Campaign Status","openapi":"GET /v1/campaigns/{id}/status","href":"/api-reference/endpoint/campaign_status"},{"title":"Send a Workflow Event","openapi":"POST /v1/campaigns/{id}/events","href":"/api-reference/endpoint/campaign_events"}]},{"group":"Do Not Disturb","icon":"phone-slash","pages":[{"title":"Add DND Number","openapi":"POST /v1/dnd_numbers","href":"/api-reference/endpoint/dnd_add"},{"title":"List DND Numbers","openapi":"GET /v1/dnd_numbers","href":"/api-reference/endpoint/dnd_list"},{"title":"Remove DND Number","openapi":"DELETE /v1/dnd_numbers","href":"/api-reference/endpoint/dnd_remove"}]},{"group":"Chat","icon":"message-lines","pages":[{"title":"Create Session","openapi":"POST /v1/chat/session","href":"/api-reference/endpoint/chat/create_session"},{"title":"Send Message","openapi":"POST /v1/chat/inbound","href":"/api-reference/endpoint/chat/send_message"},{"title":"Send Message (Async)","openapi":"POST /v1/chat/inbound/async","href":"/api-reference/endpoint/chat/inbound_async"},{"title":"Interactive Messages","href":"/api-reference/endpoint/chat/interactive_messages"},{"title":"Get Active Session","openapi":"GET /v1/chat/session/active","href":"/api-reference/endpoint/chat/active_session"},{"title":"Send Support / Control Command","openapi":"POST /v1/chat/session/{id}/support","href":"/api-reference/endpoint/chat/support"},{"title":"Inject Context","openapi":"POST /v1/chat/session/{id}/inject_context","href":"/api-reference/endpoint/chat/inject_context"},{"title":"Chat Delivery Webhook","openapi":"WEBHOOK /chat_delivery","href":"/api-reference/endpoint/chat/delivery_webhook"},{"title":"WhatsApp Template Delivery","href":"/api-reference/endpoint/chat/template_delivery"},{"title":"Get WebSocket Token","openapi":"POST /v1/chat/session/{id}/ws_token","href":"/api-reference/endpoint/chat/ws_token"},{"title":"Export Chat Sessions","openapi":"GET /v1/chat/export","href":"/api-reference/endpoint/chat/export"}]},{"group":"Utility","icon":"wrench","pages":[{"title":"Post call webhook","openapi":"WEBHOOK /webhook","href":"/api-reference/endpoint/webhook"},{"title":"Verifying webhook signatures","description":"Check that a webhook really came from Osvi before you trust it","href":"/api-reference/verifying-webhook-signatures"}]},{"group":"Legacy","icon":"clock-rotate-left","pages":[{"title":"Initiate a Phone Call","openapi":"POST /call","href":"/api-reference/endpoint/call"},{"title":"Start Chat Session","openapi":"POST /chat_sessions","description":"**Legacy — will be deprecated soon. Use the [Chat v1](/api-reference/endpoint/chat/create_session) endpoints (`POST /v1/chat/session`) for new integrations.**\n\nOpens a new chat session with the specified agent and returns a `session_id` used for all subsequent messages.","href":"/api-reference/endpoint/start_chat_session"},{"title":"Send Chat Message","openapi":"POST /chat_messages/send_message","href":"/api-reference/endpoint/send_chat_message"},{"title":"Pause Chat Session","openapi":"POST /chat_sessions/{id}/pause_session","href":"/api-reference/endpoint/pause_chat_session"},{"title":"End Chat Session","openapi":"POST /chat_sessions/{id}/close_session","href":"/api-reference/endpoint/end_chat_session"}]}]}]},"basePath":"","title":"Initiate a Phone Call - Osvi AI Docs","buildId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","deploymentId":"dpl_Fyv1NbzwP68g2bEH2Roy98uY1zmE","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-DdEMm2kG.js","utils-BMo572L7.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-C-4m9KAx.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DPLK2Oq9.js","snippetPresets-BKjfJMC9.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","conditional-requirements-CFM0id0Q.js","Page-BIYvYBgk.js","ApiExamples-DTsgtCEj.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-C8vmhyQM.js","shallow-r9w8LQGS.js","getApiPlaygroundDisplay-DjPI64HQ.js","CodeSnippet-C8Bvhl16.js","CodeSnippets-BtWUwcMy.js","getPastedJson-Dcm_3Pgl.js","icon-BXwrTpjc.js","MethodPill-CcjfVmmy.js","DuplicateIcon-BuKIbXAQ.js","createIcon-DaL9yXsO.js","DynamicMarkdown-Co5nikxh.js","SectionHeading-P4UNTsMZ.js","axios-vUo_bRtp.js","Markdown-CEfymfIH.js","clsx-Dq9TQuNi.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-D2J8knkn.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-BgZ2ThuU.js"]}