Menu
Introduction Getting started SMS Promotional - Large campaigns Transactional - Basic Transactional (Alerts) - Virtual Number Route Transactional (Alerts) - Priority Routing Transactional (OTPs & Alerts) - Special route International route to Nigeria International route to Other Countries SMS DLR SMS DLR Webhooks Voice Voice OTP Voice Broadcasts Voice DLR Units Transfer Units to Sub-Account Transfer Units to Other Account Check Units Balance Sender IDs Register Sender IDs Check Sender ID status Categories Add Customer Remove Customer Virtual Number Inbox webhook Carrier Billing Run USSD Query Run Shortcode Query Query Status Carrier Callback Tools Create Sub-Account Check DND Status Check Service Status 3rd-party integrations ZOHO
Voice Broadcast The API is used when you want to send out information in form of an audio call.
💡 USAGE Maximum of 20,000 numbers allowed per API call.
POST
https://api.textng.xyz/voice/
PHP code
<?php
  // using cURL POST
  $key="YOUR-ACCOUNT-KEY";
  $phone="080XXXXXXXX,080XXXXXXXXX,090XXXXXXXXXX";
  $message="My Voice Message";
  $custom_ref="REFERENCE-ID";
  $response = httpPost("https://api.textng.xyz/voice/",array("key"=>"$key","phone"=>"$phone","message"=>"$message","custom_ref"=>"$custom_ref"));
  // using php curl
  function httpPost($url, $data) {
    $curl = curl_init($url);
    curl_setopt($curl, CURLOPT_POST, true);
    curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($data));
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
    $response = curl_exec($curl);
    curl_close($curl);
    echo $response;
  }
?>
Parameters
Parameter Example Description
Key * XXXXX-XXXX-XXXXX This can be found in the Developers page of your dashboard. The key authorizes the transaction.
phone * 070001000, 0919494495 The recipients' phone numbers. Separate each number with commas ','
message * Hello, how are you This is the voice message to be played to the customer when the call is answered.
custom_ref YOUR TRACE ID This is the reference code or ID set from your server side/application side to trace/track the message transaction pushed to us.
Responses
Successful (JSON)
{
    "status":"Successful",
    "units_used":"4",
    "type":"single number",
    "reference":"XXXXXXXXXXXXXXXXXX",
    "custom_ref":"XXXXXXXXXXXXXXXXXXXXXXXXX",
    "route":"VOICE-BROADCAST"
}
Error (JSON)
{
    "status":"ERROR",
    "comment":"ERROR WILL BE DISPLAYED HERE"
}