Send SMS
Send a single SMS message to a customer
Send SMS
Send a single SMS for OTPs, alerts, or notices. Requests are queued; charges apply against your SMS balance. Check balance via Check SMS Balance.
All SMS endpoints return HTTP 200 with JSON. Use response_code in the body to determine success or failure.
Endpoint
POST https://api.bridgeagw.com/sms/sendRequest Headers
Authorization: Basic <base64_encoded_credentials>
Content-Type: application/jsonRequest Body
{
"service_id": 1,
"customer_number": "233244000001",
"msg_body": "Your verification code is 123456",
"sender_id": "MMDA"
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
service_id | integer | Yes | Your TheBridge service identifier |
customer_number | string | Yes | Recipient mobile number (Ghana MSISDN format, e.g. 233XXXXXXXXX) |
msg_body | string | Yes | SMS message text |
sender_id | string | Yes | Approved sender ID displayed to the recipient |
Response
Success (response_code: 370)
{
"response_code": "370",
"response_message": "SMS request has been received for processing",
"response_data": {
"processing_id": "PROC_123",
"batch_id": null,
"status": "QUEUED",
"status_code": "Q",
"page_count": 1,
"units_charged": 1,
"char_count": 35,
"encoding": "GSM",
"sms_balance": 4999
}
}| Field | Description |
|---|---|
processing_id | Unique reference for this send; use when tracking status in history |
batch_id | Always null for a single send |
status / status_code | Initial status is QUEUED / Q |
page_count | Message pages calculated from length and encoding |
units_charged | SMS units deducted from your balance |
char_count | Character count of msg_body |
encoding | GSM or UNICODE |
sms_balance | Remaining SMS balance after deduction |
Error response
{
"response_code": "<ERROR_CODE>",
"response_message": "<ERROR_MESSAGE>"
}| Code | Message |
|---|---|
216 | Missing SMS Sender ID in request |
237 | You don't have sufficient balance to complete this request |
371 | SMS request could not be processed |
Example Usage
curl -X POST "https://api.bridgeagw.com/sms/send" \
-H "Authorization: Basic <your_credentials>" \
-H "Content-Type: application/json" \
-d '{
"service_id": 1,
"customer_number": "233244000001",
"msg_body": "Your verification code is 123456",
"sender_id": "MMDA"
}'const response = await fetch('https://api.bridgeagw.com/sms/send', {
method: 'POST',
headers: {
'Authorization': 'Basic <your_credentials>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
service_id: 1,
customer_number: "233244000001",
msg_body: "Your verification code is 123456",
sender_id: "MMDA"
})
});
const result = await response.json();
console.log(result);import requests
url = "https://api.bridgeagw.com/sms/send"
headers = {
"Authorization": "Basic <your_credentials>",
"Content-Type": "application/json"
}
data = {
"service_id": 1,
"customer_number": "233244000001",
"msg_body": "Your verification code is 123456",
"sender_id": "MMDA"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)Sandbox testing
In sandbox mode, SMS messages are not delivered to real handsets. Only allowlisted MSISDNs are accepted (local 0244…, 0200…, 0270… or international 233244… equivalents). The last digit controls the simulated outcome. See the API Reference sandbox overview for the full allowlist.
| Scenario | customer_number | Send response_code | Status in history (~800ms later) |
|---|---|---|---|
| Delivered | 0244000001 | 370 | SENT / S |
| Delivered (Vodafone) | 0200000002 | 370 | SENT / S |
| Failed + refund | 0244000009 | 370 | REFUNDED / R |
| Not allowed | 0541840988 | S002 | — |
| Insufficient balance | any allowlisted | 237 | — |
The initial response for all accepted sandbox numbers returns 370 with status: "ACKNOWLEDGED". The final SENT or REFUNDED status is visible in Get SMS Send History after approximately 800ms.
Example sandbox request:
{
"service_id": 12345,
"customer_number": "0244000001",
"msg_body": "Your verification code is 123456",
"sender_id": "MYAPP"
}Notes
- Use Ghana MSISDN format (
233XXXXXXXXX) forcustomer_number. - Keep content concise and comply with local SMS regulations.
- Track delivery via Get SMS Send History using
processing_id.