You can instruct the AI agent to initiate a phone call to a specific number by making a POST request to the /call endpoint. The request body must define the bot's identity, the task to perform, the agent's phone number, and a structured claim schema to capture specific information during the conversation.
Request Body Fields
bot_company: The name of the company the bot represents.bot_name: The name of the AI assistant.phone_number: The destination phone number to call (E.164 format).task: A detailed description of the bot's objective and context.agent_phone_number: The phone number the bot will call from.claim: An array of objects defining the data points to be extracted. Each object requires a name and a type (e.g., text, datetime).
# Ask the bot to call a phone number
data='{
"bot_company": "Contoso",
"bot_name": "Amélie",
"phone_number": "+11234567890",
"task": "Help the customer with their digital workplace. Assistant is working for the IT support department. The objective is to help the customer with their issue and gather information in the claim.",
"agent_phone_number": "+33612345678",
"claim": [
{
"name": "hardware_info",
"type": "text"
},
{
"name": "first_seen",
"type": "datetime"
},
{
"name": "building_location",
"type": "text"
}
]
}'
curl \
--header 'Content-Type: application/json' \
--request POST \
--url https://xxx/call \
--data $data