Quick Send

The HTTP API enables you to send SMS quickly. To send an SMS, simply call the following URL with the relevant parameters appended to the URL, as shown below:

https://sms.textcus.com/api/v2/send?destination={recipient}&source={sender}&dlr={0}&type={0}&message={message}

NB: Please remove the curly bracket in the URL when testing

Endpoint

GET https://sms.textcus.com/api/v2/send

Headers

Authorization: Bearer API_KEY

Request Parameters

Below is a list of parameters when issuing an HTTP Request.

Sample Requests

<?php

$data = [
  'destination' => $recipient,
  'source' => $sender,
  'dlr' => 0,
  'type' => 0,
  'message' => $message
];

$url = 'https://sms.textcus.com/api/v2/send';

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_POSTFIELDS => $data,
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer API_KEY',  // Replace 'API_KEY' with your actual API key
    'Content-Type: application/json' 
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>

Sample Response

{
    "status": 200,
    "message": "Message sent successfully"
}

Last updated