Welcome to the official Robo SMS Pakistan API documentation.
Our REST API allows you to:
- Send Transactional SMS
- Send Marketing SMS
- Send Bulk SMS
- Check Account Balance
- Integrate messaging into your software, CRM, ERP, website, or mobile app
All integrations are secure and API-key protected.
๐ Authentication
To use the Robo SMS Pakistan API, you need:
- Registered Email Address
- API Key
You can generate your API key from your Robo SMS Pakistan Dashboard after logging in.
Required Parameters for Authentication:
emailโ Your registered account emailkeyโ Your unique API key
โ ๏ธ Keep your API key secure. Do not expose it in frontend code or public repositories.
๐ 1. Send SMS API
Endpoint
POST
https://portal.robosms.pk/api/send-message
โ ๏ธ GET method is NOT supported for this route.
Request Headers
You can send data using either:
Content-Type: application/json
ORContent-Type: application/x-www-form-urlencoded
Both are supported.
Required Parameters (Single SMS)
| Parameter | Type | Required | Description |
|---|---|---|---|
| string | Yes | Registered account email | |
| key | string | Yes | Your API key |
| mask | string | Yes | Approved sender mask (e.g., SMS-ALERT) |
| to | string | Yes | Recipient number in international format (923001234567) |
| message | string | Yes | SMS text (Recommended: max 160 characters) |
Example: Send Single SMS (JSON)
curl -X POST https://portal.robosms.pk/api/send-message \
-H "Content-Type: application/json" \
-d '{
"email": "[email protected]",
"key": "YOUR_API_KEY",
"mask": "SMS-ALERT",
"to": "923001234567",
"message": "Your order #12345 has been confirmed."
}'
Example: Send Single SMS (Form URL Encoded)
curl -X POST https://portal.robosms.pk/api/send-message \
-H "Content-Type: application/x-www-form-urlencoded" \
--data "[email protected]&key=YOUR_API_KEY&mask=SMS-ALERT&to=923001234567&message=Your%20order%20confirmed"
๐ฆ Bulk SMS (Multiple Numbers โ Same Message)
To send the same message to multiple numbers in one request:
Add this parameter:
multiple=1
Send numbers comma-separated in the to field.
Required Parameters (Bulk SMS)
| Parameter | Required |
|---|---|
| Yes | |
| key | Yes |
| mask | Yes |
| multiple | Yes (set value to 1) |
| to | Yes (comma-separated numbers) |
| message | Yes |
Example: Bulk SMS Request
curl -X POST https://portal.robosms.pk/api/send-message \
-H "Content-Type: application/x-www-form-urlencoded" \
--data "[email protected]&key=YOUR_API_KEY&mask=SMS-ALERT&multiple=1&to=923151231015,923151231016&message=Special%20discount%20available"
Important Note
If each user requires a personalized message, send requests individually in a loop from your system.
๐ 2. Check SMS Balance API
Endpoint
GET
https://portal.robosms.pk/api/check-balance?key=YOUR_API_KEY
Example Request
curl https://portal.robosms.pk/api/check-balance?key=YOUR_API_KEY
Sample Response
{
"sms": {
"code": "000",
"balance": "12.50",
"username": "yourusername",
"message_rates": "0.50"
}
}
๐ API Response Codes
| 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
- Sign Up on Robo SMS Portal
- Purchase an SMS Package (Transactional / Marketing)
- Get your Sender Mask Approved from PTA
- Generate API Key from Dashboard
- Integrate API into your system
You can integrate using:
- PHP
- Laravel
- Node.js
- Python
- Google Sheets
- CRM/ERP systems
- Any REST-supported environment
๐ Security Best Practices
- Store API keys on server-side only
- Do not expose keys in JavaScript frontend
- Whitelist your server IP for additional security
- Validate numbers before sending
๐ Need Help?
Email: [email protected]
Portal: https://portal.robosms.pk
Our technical team is available to assist with integration.