menu logo

API/Voicebot/Call

Place a Robo call request to a patient.

  1. Send a voice call request and receive a call ID
  2. Get the status of the call using the call ID Get call processing status

Authentication

All API requests require an API key to be included in the headers:

Authorization: Bearer [access-key]

Endpoint

POST https://voicebot.intron.health/voicebot/v1/call

Request Body JSON

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
  • afrikaans
  • akan
  • amharic
  • arabic
  • bajju
  • bekwarra
  • benin
  • bette
  • chichewa
  • ebira
  • eggon
  • epie
  • estako
  • french
  • fulani
  • ga
  • gerawa
  • hausa
  • ibibio
  • idoma
  • igala
  • igbo
  • ijaw
  • isindebele
  • isoko
  • kanuri
  • kinyarwanda
  • luganda
  • nupe
  • nyandang
  • ogbia
  • ogoni
  • pidgin
  • sepedi
  • sesotho
  • shona
  • siswati
  • swahili
  • tiv
  • tswana
  • twi
  • urhobo
  • xhosa
  • yoruba
  • zulu
tts_voice_gender String Gender of the voice used on the call no male | female

Basic request and response sample

                    
                        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"
                        }
                    
                

Workflow Message Requirements

  • The message length after replacing variables must not exceed 1000 characters
  • Use [parameter_name] syntax to insert dynamic values in your message
  • Example: "Hello [name], your appointment is scheduled for [date] at [time]"

Quotas and Limits

  • Rate limit: 5 requests per second