Initiate a Phone Call
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.
This is the current, versioned call endpoint. Only agent_uuid, phone_number, and country_code are required; omit any optional field to fall back to the agent’s configured defaults.
Authorizations
16-character API token associated with your OSVI account. Find it in your dashboard under Settings → API.
Body
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.
"agent_IsxxxxSf_60EhxxxxMGbz-Rxxg"
Destination phone number (digits only, without country code). Normalized and validated against country_code; an implausible number returns 400 Bad Request.
"9876543210"
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.
"IN"
Optional runtime override for the agent's system prompt for this call only.
"You are calling to confirm the appointment scheduled for tomorrow at 10 AM."
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.
"https://yourdomain.com/osvi-webhook"
Name of the person being called. Made available to the agent during the call.
"John Doe"
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.
{
"appointment_date": "2025-01-15",
"product_name": "Premium Plan"
}Opening line the agent speaks when the call connects. Maximum 2000 characters.
2000"Hello John, this is a reminder about your appointment tomorrow at 10 AM."
Per-call overrides for call behavior. All fields are optional.
{
"max_call_duration_seconds": 300,
"enable_callback": false,
"retry_config": {
"enabled": true,
"max_attempts": 2,
"interval_minutes": 30
}
}List of data points the agent should attempt to extract during the conversation. Must be an array; each item requires a non-empty description.
[
{
"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"
}
]