Robo SMS API Documentation
Welcome to Robo SMS Pakistan API documentation. Use our REST API to send transactional and promotional SMS, check balances, and manage delivery workflows programmatically.
Authentication
All API requests require your API key. Keep it private and pass it as api_key for GET examples or Bearer token for JSON POST requests.
Base URL
https://portal.robosms.pk/apiSend SMS Single
Send a single SMS to one mobile number. Parameters are passed as URL query parameters.
https://portal.robosms.pk/api/send-messageRequired Parameters (Single SMS)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
api_key |
string | Yes | Your API key from dashboard | YOUR_API_KEY |
to / numbers |
string | Yes | Recipient mobile number or comma separated numbers | 923001234567 |
message |
string | Yes | Message content | Your OTP is 123456 |
from |
string | No | Sender ID Mask or Short Code | YOURBRAND / XXXX |
type |
string | No | transactional or promotional | transactional |
unicode |
string | No | 0 for English, 1 for Unicode | 0 |
Sample URL
https://portal.robosms.pk/api/[email protected]&key=YOUR_API_KEY&mask=SMS-ALERT&to=923001234567&message=Your%20OTP%20is%20123456
Example: Send Single SMS (GET / cURL)
curl "https://portal.robosms.pk/api/[email protected]&key=YOUR_API_KEY&mask=SMS-ALERT&to=923001234567&message=Your%20order%20%2312345%20has%20been%20confirmed"
Example Payload Reference
{
"email": "[email protected]",
"key": "YOUR_API_KEY",
"mask": "SMS-ALERT",
"to": "923001234567",
"message": "Your order #12345 has been confirmed."
}
Sample Response
{
"status": "success",
"code": "000",
"message": "Message queued successfully",
"message_id": "RSMS-123456"
}
Send SMS Bulk
To send the same message to multiple numbers in one request, use GET with query parameters, pass multiple=1 and send comma-separated numbers in the to field.
If each user requires a personalized message, send requests individually in a loop from your system.
https://portal.robosms.pk/api/send-messageRequired Parameters (Bulk SMS)
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
api_key |
string | Yes | Your API key from dashboard | YOUR_API_KEY |
to / numbers |
string | Yes | Recipient mobile number or comma separated numbers | 923001234567 |
message |
string | Yes | Message content | Your OTP is 123456 |
from |
string | No | Sender ID Mask or Short Code | YOURBRAND / XXXX |
type |
string | No | transactional or promotional | transactional |
unicode |
string | No | 0 for English, 1 for Unicode | 0 |
multiple |
string | Yes | Set value to 1 for bulk SMS | 1 |
Sample URL
https://portal.robosms.pk/api/[email protected]&key=YOUR_API_KEY&mask=SMS-ALERT&multiple=1&to=923151231015,923151231016&message=Special%20discount%20available
Example: Bulk SMS Request (GET / cURL)
curl "https://portal.robosms.pk/api/[email protected]&key=YOUR_API_KEY&mask=SMS-ALERT&multiple=1&to=923151231015,923151231016&message=Special%20discount%20available"
Query Parameter Reference
[email protected]
key=YOUR_API_KEY
mask=SMS-ALERT
multiple=1
to=923151231015,923151231016
message=Special discount available
Sample Response
{
"status": "success",
"code": "000",
"message": "Bulk messages queued successfully",
"total_numbers": 2
}
Check SMS Balance
Check your available SMS balance from your account.
https://portal.robosms.pk/api/check-balanceExample Request
curl "https://portal.robosms.pk/api/check-balance?key=YOUR_API_KEY"
Sample Response
{
"sms": {
"code": "000",
"balance": "12,500",
"username": "yourusername",
"message_rates": "0.50"
}
}
API Response Codes
200 Success, 400 Missing parameters, 401 Invalid API key, 402 Insufficient balance, 429 Rate limit exceeded, 500 Server error.
| Code | Meaning |
|---|---|
000 | Message queued successfully |
100 | Message sent successfully |
101 | Message sending failed |
102 | Message handed to telecom |
200 | Success response |
201 | General API error |
202 | Required parameters missing |
203 | Invalid API key |
204 | Admin balance insufficient |
205 | User balance insufficient |
206 | Account suspended or blocked |
210 | IP not whitelisted |
212 | Masking not authorized |
213 | Character limit exceeded |
215 | Invalid number format (0345...) |
216 | Invalid number format (345...) |
How to Start Using Robo SMS API
1. Sign up on Robo SMS Portal
2. Purchase an SMS package
3. Get your Sender Mask approved from PTA if needed
4. Generate API key from dashboard
5. Integrate API into your system
You can integrate using PHP, Laravel, Node.js, Python, Google Sheets, CRM/ERP systems or any REST-supported environment.
Security Best Practices
Do not expose your API key in frontend code. Use HTTPS for all requests, rotate keys when needed, and validate numbers before sending.
Short Code and Masking Notes
Short Code and Sender ID Masking use the same SMS API. Change the from value only. Sender ID Mask example: from=YOURBRAND. Short Code example: from=XXXX. Both require additional KYC and documentation for PTA compliance. Short Code is a separate package and MRC monthly recurring charges apply.
Short Code (Pre-Approved)
Use from=XXXX with the same SMS API. Short Code has a separate package and MRC monthly recurring charges apply.
Sender ID Masking (Same API)
Use from=YOURBRAND with the same SMS API. Additional KYC and documentation are required for PTA compliance.
For Short Code and Sender ID Masking service, additional KYC and documentation is required as per PTA regulations. Our team will guide you through the complete compliance process.
