Account Balance
TextCus Balance API allows you to retrieve your total sms, email & wallet balance information from your account. This endpoint can also help you create notifications when your balance is going low.
Endpoint
GET
https://api.textcus.com/api/v2/balance
Headers
Authorization: Bearer API_KEY
Header Parameters
Parameters
Type
Description
apikey
string
Required
Your unique API key is required to retrieve your TextCus balance
Sample Requests
<?php
$url = 'https://api.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,
"sms_balance": 71429,
"email_balance": 2000,
"wallet_balance": 0.00,
}
}
Last updated