Bridge API DocsBridge API Docs
Bridge API Docs
Api reference

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/send

Request Headers

Authorization: Basic <base64_encoded_credentials>
Content-Type: application/json

Request Body

{
  "service_id": 1,
  "customer_number": "233244000001",
  "msg_body": "Your verification code is 123456",
  "sender_id": "MMDA"
}

Parameters

ParameterTypeRequiredDescription
service_idintegerYesYour TheBridge service identifier
customer_numberstringYesRecipient mobile number (Ghana MSISDN format, e.g. 233XXXXXXXXX)
msg_bodystringYesSMS message text
sender_idstringYesApproved 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
  }
}
FieldDescription
processing_idUnique reference for this send; use when tracking status in history
batch_idAlways null for a single send
status / status_codeInitial status is QUEUED / Q
page_countMessage pages calculated from length and encoding
units_chargedSMS units deducted from your balance
char_countCharacter count of msg_body
encodingGSM or UNICODE
sms_balanceRemaining SMS balance after deduction

Error response

{
  "response_code": "<ERROR_CODE>",
  "response_message": "<ERROR_MESSAGE>"
}
CodeMessage
216Missing SMS Sender ID in request
237You don't have sufficient balance to complete this request
371SMS 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.

Scenariocustomer_numberSend response_codeStatus in history (~800ms later)
Delivered0244000001370SENT / S
Delivered (Vodafone)0200000002370SENT / S
Failed + refund0244000009370REFUNDED / R
Not allowed0541840988S002
Insufficient balanceany allowlisted237

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) for customer_number.
  • Keep content concise and comply with local SMS regulations.
  • Track delivery via Get SMS Send History using processing_id.