REST API v1.0

Programmatic Messaging for Developers

Send transactional alerts, dynamic notices, and high-volume broadcasts directly from your code with our lightning-fast, high-deliverability JSON REST API.

Get Your Free API Key Explore Endpoints

Authentication

Authenticate all API requests by providing your custom API token generated in your client dashboard. You can pass the key in either the ApiKey custom header or as a standard Bearer token:

ApiKey: YOUR_API_TOKEN_HERE
# OR
Authorization: Bearer YOUR_API_TOKEN_HERE

Core REST Endpoints

Simple, predictable HTTP endpoints with multi-language code snippets and standard JSON payloads.

POST

/api/sms/send

Dispatches a single message or bulk broadcast to one or multiple comma-separated recipient numbers.

curl -X POST "https://api.xyzsms.com/api/sms/send" \
  -H "ApiKey: YOUR_API_TOKEN_HERE" \
  -H "Content-Type: application/json" \
  -d '{
    "senderId": "YourBrand",
    "recipients": "2348012345678,2348098765432",
    "content": "Dear Customer, thank you for your patronage! Enjoy 10% off with code THANKYOU."
  }'

Response (200 OK)

{
  "success": true,
  "responseCode": "200",
  "message": "Message queued and dispatched successfully",
  "description": "2 message(s) sent. 2 units deducted."
}
GET

/api/sms/balance

Returns the available messaging credit units remaining in your account.

Response (200 OK)

{
  "balance": 4820.50
}
GET

/api/sms/history

Retrieves the 50 most recent message records dispatched via your account.

Response (200 OK)

[
  {
    "senderId": "YourBrand",
    "recipients": "2348012345678",
    "messageContent": "Dear Customer, thank you for your patronage! Enjoy 10% off with code THANKYOU.",
    "unitsUsed": 1.0,
    "status": "Sent",
    "deliveredDate": "2026-08-19T10:14:22Z"
  }
]