cURL
Python
JavaScript
PHP
Go
Java
curl --request POST \
--url https://api.prod.usesimple.ai/api/v1/calls \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"to_number": "+12345678900",
"from_number_id": "123e4567-e89b-12d3-a456-426614174000",
"record": false,
"language": "en",
"prompt": "Hello, I' \ ''m calling to confirm your appointment",
"boost_keywords": [
"appointment",
"schedule",
"morning"
],
"agent_id": "123e4567-e89b-12d3-a456-426614174000",
"params": {
"appointment_type": "morning",
"customer_id": "123456"
},
"analyzers": [
{
"prompt": "<string>",
"title": "<string>",
"output_config": {
"type": "string",
"properties": {}
}
}
]
}'
{
"success" : true ,
"status" : "<string>" ,
"uuid" : "<string>" ,
"record" : true ,
"language" : "en" ,
"answered_by" : "voicemail" ,
"analyzers" : [
{
"id" : "3c90c3cc-0d44-4b50-8888-8dd25736052a" ,
"prompt" : "<string>" ,
"output_config" : {
"type" : "string" ,
"properties" : { }
}
}
] ,
"analysis_results" : [
{
"id" : "3c90c3cc-0d44-4b50-8888-8dd25736052a" ,
"analyzer_id" : "3c90c3cc-0d44-4b50-8888-8dd25736052a" ,
"prompt" : "<string>" ,
"output_config" : { } ,
"result" : { }
}
]
}
The simplest way to use Simple AI is to use the create-call
endpoint with just a prompt and an array of tools. If you need more control you shoudl use “agents”.
Request to initiate an AI phone call
The phone number to call in E.164 format
The prompt to use for the AI call. Required if agent_id is not provided
Example: "Hello, I'm calling to confirm your appointment"
The UUID of the phone number to use for the outbound call. If not provided, a phone number will be automatically selected.
Example: "123e4567-e89b-12d3-a456-426614174000"
Whether to record the call or not
The language to use for the call - English (en) or Spanish (es)
Available options:
en
,
es
,
ar
Keywords to emphasize during the conversation
Example: ["appointment", "schedule", "morning"]
ID of the pre-configured agent to handle the call. Required if prompt is not provided. Cannot be used together with analyzers - use the agent's analyzers instead.
Example: "123e4567-e89b-12d3-a456-426614174000"
Additional parameters to pass to the call. These will be subtituted into the prompt for all keys with {{params.key}}
Example: {
"appointment_type": "morning",
"customer_id": "123456"
}
List of analyzers to run after the call. Can only be provided when agent_id is not provided. If using an agent, use the agent's analyzers instead.
The prompt to use for analysis
The title of the analyzer
Configuration for the expected output format
analyzers.output_config. type
The type of output expected
Available options:
string
,
boolean
,
datetime
,
object
analyzers.output_config. properties
Required when type is 'object'. Defines the structure of the object
analyzers.output_config.properties. {key}
analyzers.output_config.properties.{key}. type
Available options:
string
,
boolean
,
datetime
Available options:
en
,
es
,
ar
Indicates how the call was answered - by a human, voicemail, or if there was no answer
Available options:
voicemail
,
human
,
no_answer
,
unknown
List of analyzers configured for this call
Unique identifier for the analyzer
The prompt used for analysis
Configuration for the expected output format
analyzers.output_config. type
The type of output expected
Available options:
string
,
boolean
,
datetime
,
object
analyzers.output_config. properties
Required when type is 'object'. Defines the structure of the object
analyzers.output_config.properties. {key}
analyzers.output_config.properties.{key}. type
Available options:
string
,
boolean
,
datetime
Results from analyzers that have completed
Unique identifier for the analysis result
analysis_results. analyzer_id
Identifier of the analyzer that produced this result
The prompt used for analysis
analysis_results. output_config
Configuration for the expected output format
The analysis result, structure depends on the output_config