Place a Robo call request to a patient.
All API requests require an API key to be included in the headers:
Authorization: Bearer [access-key]
https://voicebot.intron.health/voicebot/v1/call
Field | Type | Description | Required | Options | Default |
---|---|---|---|---|---|
workflow_id |
String | Unique identifier for the workflow to be executed | yes | ||
workflow_params |
Array | Array of objects containing phone numbers and workflow variables. Phone number is required for each entry. | yes | ||
tts_voice_accent |
String | Accent for the voice used on the call | no |
|
|
tts_voice_gender |
String | Gender of the voice used on the call | no | male | female |
curl --location 'https://voicebot.intron.health/voicebot/v1/call' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer api-key' \
--data '{
"tts_voice_accent": "igbo",
"tts_voice_gender": "female",
"workflow_id": "9b643eb4-0799-4761-bd34-9580eb315aaf",
"workflow_params": [
{
"phone_number": "+2348076960623",
"workflow_variables": {
"name": "James"
}
}
]
}'
import requests
url = "https://voicebot.intron.health/voicebot/v1/call"
payload = {
"tts_voice_accent": "igbo",
"tts_voice_gender": "female",
"workflow_id": "9b643eb4-0799-4761-bd34-9580eb315aaf",
"workflow_params": [
{
"phone_number": "+2348076960623",
"workflow_variables": {
"name": "James"
}
}
]
}
headers = {
"Authorization": "Bearer api-key"
}
response = requests.request("POST", url, headers=headers, json=payload)
print(response.json)
const requestOptions = {
method: "POST",
headers: {
'Authorization': 'Bearer api-Key'
},
body: JSON.stringify(
{
"tts_voice_accent": "igbo",
"tts_voice_gender": "female",
"workflow_id": "9b643eb4-0799-4761-bd34-9580eb315aaf",
"workflow_params": [
{
"phone_number": "+2348076960623",
"workflow_variables": {
"name": "James"
}
}
]
}
)
};
fetch("https://voicebot.intron.health/voicebot/v1/call", requestOptions)
.then((response) => response.text())
.then((result) => console.log(result))
.catch((error) => console.error(error));
{
"data": {
"batch_id": "c4971df1-2978-4c06-b32c-7d5ea47256e1"
},
"message": "batch request created successfully",
"status": "Ok"
}
{
"data": {
"call_id": "12a9767f-b865-4404-91d0-a65d4cdt78fs",
"processing_status": "VOICE_CALL_PROCESSED"
},
"message": "call status found",
"status": "Ok"
}