Bridge API DocsBridge API Docs
Bridge API Docs
Api reference

Get SMS Send History

Retrieve paginated SMS send records for a service

Get SMS Send History

Returns paginated send records for a service. Filter by status, batch, or date range.

Endpoint

POST https://api.bridgeagw.com/sms/history

Request Headers

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

Request Body

{
  "service_id": 1,
  "page": 1,
  "limit": 10,
  "batch_id": "BATCH_123"
}

Parameters

ParameterTypeRequiredDescription
service_idintegerYesYour TheBridge service identifier
pageintegerNoPage number (default: 1)
limitintegerNoRecords per page (default applies if omitted)
statusstringNoFilter by status: QUEUED, SENT, FAILED, REFUNDED (or Q, S, F, R)
batch_idstringNoFilter by bulk batch ID from Send Bulk SMS
start_datestringNoStart date, inclusive (YYYY-MM-DD)
end_datestringNoEnd date, inclusive (YYYY-MM-DD)

Response

Success (response_code: 393)

{
  "response_code": "393",
  "response_message": "SMS history retrieved successfully",
  "response_data": [
    {
      "processing_id": "PROC_123",
      "batch_id": "BATCH_123",
      "customer_number": "233XXXXXXXXX",
      "message": "Your payment was received. Thank you.",
      "sender_id": "MMDA",
      "char_count": 35,
      "page_count": 1,
      "units_charged": 1,
      "status": "QUEUED",
      "status_code": "Q",
      "provider_code": null,
      "error_message": null,
      "source": "CLIENT",
      "source_code": "C",
      "created_at": "2026-05-30T17:18:19Z",
      "sent_at": null
    }
  ],
  "pagination": {
    "total_no_of_records": 15,
    "total_pages": 2,
    "current_page": 1,
    "items_per_page": 10
  }
}
FieldDescription
processing_idUnique send reference
batch_idBulk batch ID, or null for single sends
customer_numberRecipient mobile number
messageMessage text sent
sender_idSender ID used
char_count / page_count / units_chargedMessage size and units billed
status / status_codeQUEUED/Q, SENT/S, FAILED/F, or REFUNDED/R
provider_codeProvider response code when available
error_messageFailure reason when status is FAILED
source / source_codeOrigin of the send (CLIENT / C)
created_atUTC timestamp when the request was created
sent_atUTC timestamp when the message was sent, or null while queued
paginationPage metadata for the result set

Error response

{
  "response_code": "<ERROR_CODE>",
  "response_message": "<ERROR_MESSAGE>"
}

Example Usage

curl -X POST "https://api.bridgeagw.com/sms/history" \
  -H "Authorization: Basic <your_credentials>" \
  -H "Content-Type: application/json" \
  -d '{
    "service_id": 1,
    "page": 1,
    "limit": 10,
    "batch_id": "BATCH_123"
  }'
const response = await fetch('https://api.bridgeagw.com/sms/history', {
  method: 'POST',
  headers: {
    'Authorization': 'Basic <your_credentials>',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    service_id: 1,
    page: 1,
    limit: 10,
    batch_id: "BATCH_123"
  })
});

const result = await response.json();
console.log(result);
import requests

url = "https://api.bridgeagw.com/sms/history"
headers = {
    "Authorization": "Basic <your_credentials>",
    "Content-Type": "application/json"
}
data = {
    "service_id": 1,
    "page": 1,
    "limit": 10,
    "batch_id": "BATCH_123"
}

response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)

Sandbox testing

In sandbox mode, SMS delivery is simulated asynchronously. After a send returns 370 ACKNOWLEDGED, the status transitions to its final state after approximately 800ms. Querying history before that window may show ACKNOWLEDGED; query again shortly after to see the final outcome.

SMS status lifecycle in sandbox:

Stagestatusstatus_codeWhen
Request acceptedACKNOWLEDGEDAImmediately on send
Delivered (simulated)SENTS~800ms later (number ending 0–8)
Failed + refundREFUNDEDR~800ms later (number ending 9)

Filter history with the status parameter using ACKNOWLEDGED, SENT, REFUNDED, or the single-character codes A, S, R.

Notes

  • Use processing_id from Send SMS to look up individual sends.
  • Use batch_id from Send Bulk SMS to filter batch results.