Account Balance

TextCus Balance API allows you to retrieve your total balance and rate information from your account. This endpoint can also help you create notifications when your balance is going low.

Endpoint

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

Headers

Authorization: Bearer API_KEY

Header Parameters

Sample Requests

<?php
$url = 'https://sms.textcus.com/api/v2/balance';

$curl = curl_init();

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

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>

Sample Response

{
    "status": 200,
    "message": "Balance retrieved",
    "data": {
        "sms_rate": 0.028,
        "amount": 2000,
        "sms_no": 71429
    }
}

Last updated