Api reference
Check SMS Balance
Retrieve your SMS page-credit balance for a service
Check SMS Balance
Returns SMS balance in page-credit units (integer) for the specified service.
Endpoint
POST https://api.bridgeagw.com/sms/balanceRequest Headers
Authorization: Basic <base64_encoded_credentials>
Content-Type: application/jsonRequest Body
{
"service_id": 1
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service_id | integer | Yes | Your TheBridge service identifier |
Response
Success (response_code: 388)
{
"response_code": "388",
"response_message": "SMS balance retrieved successfully",
"response_data": {
"entity_service_id": 1,
"sms_balance": 5000,
"last_updated": "2026-05-30T17:15:30Z"
}
}| Field | Description |
|---|---|
entity_service_id | Service identifier queried |
sms_balance | Current SMS page-credit balance |
last_updated | UTC timestamp of the last balance update |
Error response
{
"response_code": "<ERROR_CODE>",
"response_message": "<ERROR_MESSAGE>"
}Example Usage
curl -X POST "https://api.bridgeagw.com/sms/balance" \
-H "Authorization: Basic <your_credentials>" \
-H "Content-Type: application/json" \
-d '{
"service_id": 1
}'const response = await fetch('https://api.bridgeagw.com/sms/balance', {
method: 'POST',
headers: {
'Authorization': 'Basic <your_credentials>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
service_id: 1
})
});
const result = await response.json();
console.log(result);import requests
url = "https://api.bridgeagw.com/sms/balance"
headers = {
"Authorization": "Basic <your_credentials>",
"Content-Type": "application/json"
}
data = {
"service_id": 1
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)Sandbox testing
In sandbox mode, the SMS balance is mocked. A freshly initialised sandbox service returns a balance of 500 units. Sending SMS messages against the sandbox deducts from this in-memory balance — it does not reset between sessions. Check this endpoint before SMS testing to confirm you have sufficient units.
Notes
- SMS balance is separate from payout/collection balances on Get Account Balance.
- Use this endpoint before Send SMS or Send Bulk SMS campaigns.