Making an Outgoing Voice Call to Send a Simple Text-to-Speech message

In this section, you will be acquainted with making an Outgoing call, which could be achieved by using Unifonic Voice APIs.

curl --location --request POST 'https://voice.unifonic.com/v1/calls' \
--header 'AppsId: 'XXXXXXXXXXXXX'\
--header 'Content-Type: application/json' \
{
    "recipient":["+966111111111"],
    "type" : "tts",
    "callerId" : "+966115219100",
    "tts":{
    "language" : "english",
        "voice" : "male",
        "text" : "Hello User, your account balance is low. Please top up immediately to continue to enjoy this service."
    }
}

📘

This is a sample payload that creates a phone call to the recipient +966111111111 and plays an audio file that is required based on what is found in the text parameter.

{
    "status": "Request has been sent.",
    "callId": "1c9ebf6a-dd62-4c49-b0b3-c1b1494e01f1"
}

If an API attempt is accepted then an API response will be returned.

Each call status can be tracked using GET/Call Status API or via a Webhook. (Insert link)