Send SMS messages globally with our powerful RESTful API. Get started in minutes with comprehensive guides and examples.
Authorization: Bearer YOUR_API_KEYKeep your API key secure
Never expose your API key in client-side code or public repositories.
sender_idstringYesApproved sender IDrecipientsarrayYesPhone numbers with country codesmessagestringYesSMS message content (max 1600 chars)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);{
"success": true,
"message": "SMS sent successfully",
"data": {
"message_id": "msg_1234567890",
"recipients": ["+1234567890"],
"cost": 0.05,
"estimated_delivery": "2024-01-15T10:30:00Z"
}
}const response = await fetch('https://api.bulksmspro.com/v1/balance', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY'
}
});
const balance = await response.json();
console.log(balance);{
"success": true,
"data": {
"balance": 127.50,
"currency": "USD",
"last_updated": "2024-01-15T09:45:00Z"
}
}{
"success": false,
"error": {
"code": "INVALID_SENDER_ID",
"message": "The sender ID 'INVALID' is not approved for your account"
}
}INVALID_API_KEYThe provided API key is invalid or missing
INSUFFICIENT_BALANCENot enough balance to send the SMS
INVALID_SENDER_IDThe sender ID is not approved for your account
INVALID_RECIPIENTSOne or more recipient numbers are invalid
MESSAGE_TOO_LONGMessage exceeds the maximum length limit
RATE_LIMIT_EXCEEDEDToo many requests, please try again later