Transactional SMS API Documentation
Welcome to the Robo SMS Pakistan transactional API documentation.
This portal is dedicated to transactional messaging and Short Code OTP routes for enterprise and corporate use cases. For marketing SMS and smaller transactional accounts, use portal.robosms.pk.
All corporate integrations are secure and API-key protected.
Authentication
To use the corporate Robo SMS API, you need your registered corporate account credentials and API key. Generate your API key from the Corporate Robo SMS dashboard after login.
Required authentication parameters: email and key. Keep your API key secure and never expose it in frontend code or public repositories.
Base URL
https://corporate.robosms.pk/api1. Send Transactional SMS API
Send a transactional SMS or Short Code OTP to one mobile number. The API uses GET and parameters are passed as URL query parameters.
https://corporate.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://corporate.robosms.pk/api/[email protected]&key=YOUR_API_KEY&mask=XXXX&to=923001234567&message=Your%20OTP%20is%20123456
Example: Send Single SMS (GET / cURL)
curl "https://corporate.robosms.pk/api/[email protected]&key=YOUR_API_KEY&mask=XXXX&to=923001234567&message=Your%20OTP%20is%20123456"
Example Payload Reference
{
"email": "[email protected]",
"key": "YOUR_API_KEY",
"mask": "XXXX",
"to": "923001234567",
"message": "Your OTP is 123456"
}
Sample Response
{
"status": "success",
"code": "000",
"message": "Message queued successfully",
"message_id": "RSMS-123456"
}
Transactional SMS (Multiple Numbers - Same Message)
To send the same approved transactional notification to multiple numbers in one request, use GET with query parameters, pass multiple=1 and send comma-separated numbers in the to field.
For OTP messages, send each recipient request individually from your secure server workflow.
https://corporate.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://corporate.robosms.pk/api/[email protected]&key=YOUR_API_KEY&mask=YOURBRAND&multiple=1&to=923151231015,923151231016&message=Your%20account%20alert%20is%20available
Example: Bulk SMS Request (GET / cURL)
curl "https://corporate.robosms.pk/api/[email protected]&key=YOUR_API_KEY&mask=YOURBRAND&multiple=1&to=923151231015,923151231016&message=Your%20account%20alert%20is%20available"
Query Parameter Reference
[email protected]
key=YOUR_API_KEY
mask=YOURBRAND
multiple=1
to=923151231015,923151231016
message=Your account alert is available
Sample Response
{
"status": "success",
"code": "000",
"message": "Transactional messages queued successfully",
"total_numbers": 2
}
2. Check SMS Balance API
Check the available transactional SMS or Short Code balance for your corporate account.
https://corporate.robosms.pk/api/check-balanceExample Request
curl "https://corporate.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
Use the response code table below to debug corporate API requests and transactional delivery states.
| 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 Corporate Robo SMS API
1. Create your corporate account on corporate.robosms.pk
2. Complete required KYC and compliance documentation
3. Activate your transactional mask or Short Code route
4. Generate your API key from the corporate dashboard
5. Integrate the API securely into your system
You can integrate from PHP, Laravel, Node.js, Python, CRM/ERP systems or any REST-supported server environment.
Security Best Practices
Store API keys on server-side only.
Do not expose keys in JavaScript frontend.
Whitelist your server IP where applicable.
Validate recipient numbers and OTP workflows before sending.
Short Code and Transactional Masking Notes
Transactional Sender ID Masking and Short Code use this corporate SMS API. Change the mask value only. Sender ID Mask example: mask=YOURBRAND. Short Code example: mask=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.
