v1.0

BulkSMSPro API Documentation

Send SMS messages globally with our powerful RESTful API. Get started in minutes with comprehensive guides and examples.

Authentication
All API requests must be authenticated using your API key in the Authorization header.
Authorization: Bearer YOUR_API_KEY

Keep your API key secure

Never expose your API key in client-side code or public repositories.

Send SMS
Send SMS messages to one or multiple recipients using the POST /v1/sms endpoint.

Endpoint

POSThttps://api.bulksmspro.com/v1/sms

Parameters

FieldTypeRequiredDescription
sender_idstringYesApproved sender ID
recipientsarrayYesPhone numbers with country codes
messagestringYesSMS message content (max 1600 chars)

Code Examples

const response = await fetch('https://api.bulksmspro.com/v1/sms', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    sender_id: 'YourBrand',
    recipients: ['+1234567890'],
    message: 'Hello from BulkSMSPro!'
  })
});

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

Response

{
  "success": true,
  "message": "SMS sent successfully",
  "data": {
    "message_id": "msg_1234567890",
    "recipients": ["+1234567890"],
    "cost": 0.05,
    "estimated_delivery": "2024-01-15T10:30:00Z"
  }
}
Check Balance
Retrieve your current account balance and usage information.

Endpoint

GEThttps://api.bulksmspro.com/v1/balance
const response = await fetch('https://api.bulksmspro.com/v1/balance', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY'
  }
});

const balance = await response.json();
console.log(balance);

Response

{
  "success": true,
  "data": {
    "balance": 127.50,
    "currency": "USD",
    "last_updated": "2024-01-15T09:45:00Z"
  }
}
Error Codes
Common error codes and their meanings when working with the API.

Error Response Format

{
  "success": false,
  "error": {
    "code": "INVALID_SENDER_ID",
    "message": "The sender ID 'INVALID' is not approved for your account"
  }
}

Common Error Codes

401
INVALID_API_KEY

The provided API key is invalid or missing

402
INSUFFICIENT_BALANCE

Not enough balance to send the SMS

400
INVALID_SENDER_ID

The sender ID is not approved for your account

400
INVALID_RECIPIENTS

One or more recipient numbers are invalid

400
MESSAGE_TOO_LONG

Message exceeds the maximum length limit

429
RATE_LIMIT_EXCEEDED

Too many requests, please try again later