Welcome to the Robo SMS Pakistan API documentation. Our SMS gateway allows you to easily send transactional and marketing messages, check balances, and integrate messaging features into your platform or software.
π Authentication
To access the API, you need a unique API Key.
You can generate your API key by signing up and logging into your Dashboard.
- Parameter:
key
- Example:
YOUR_API_KEY_HERE
Keep your API key secure and never expose it in public environments.
π 1. Send SMS API
Endpoint:
POST https://portal.robosms.pk/api/send-message
Request Headers:
Content-Type: application/json
Required Parameters:
Parameter | Type | Description |
---|---|---|
key | string | Your API key |
mask | string | Sender mask (e.g., MYCOMPANY) |
to | string | Recipient mobile number (e.g., 923001234567) |
message | string | The text message to send (max 160 chars) |
Sample Request Body (JSON):
json{
"key": "YOUR_API_KEY_HERE",
"mask": "MYCOMPANY",
"to": "923001234567",
"message": "Your OTP code is 7259. Thank you for using our service!"
}
β Do not use GET method
The GET method is not supported for this route. You must use the POST method when calling this endpoint. Attempting to open the link in a browser will return:
pgsql The GET method is not supported for route api/send-message.
Use tools like Postman, curl, or your application code to send proper POST requests.
π 2. Check SMS Balance API
Endpoint:
GET https://portal.robosms.pk/api/check-balance?key=YOUR_API_KEY_HERE
Sample Response:
json{
"sms": {
"code": "000",
"balance": "12.50",
"username": "yourusername",
"message_rates": "0.50"
}
}
π Response & Status Codes
These codes will help you understand the status of your API requests:
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 | Reseller Balance Insufficient |
205 | User Balance Insufficient |
206 | Account Suspended or Blocked |
207 | Invalid Language (Encoding) |
208 | Duplicate Language Error |
209 | Email Blocked |
210 | IP Not Whitelisted |
211 | User Not Found |
212 | Masking Not Authorized |
213 | Character Limit Exceeded |
214 | Character Limit or Invalid Format |
215 | Invalid Number Format (0345…) |
216 | Invalid Number Format (345…) |
π How to Use Robo SMS API
- Sign Up at Robo SMS Portal
- Buy Package (Transactional / Marketing)
- Get Mask Approved (Sender ID)
- Upload Contacts (via Excel or manually)
- Start Sending SMS via:
- π₯ Portal Dashboard
- π§Ύ Excel Upload
- π REST API Integration
π‘ Sample Integration (Using cURL)
curl -X POST https://portal.robosms.pk/api/send-message \
-H "Content-Type: application/json" \
-d '{
"key": "YOUR_API_KEY_HERE",
"mask": "MYCOMPANY",
"to": "923001234567",
"message": "Your order #12345 has been confirmed."
}'
π© Bulk SMS via API
You can also integrate bulk sending by hitting this API repeatedly in a loop or system with multiple numbers and personalized messages.
For WhatsApp integration, visit our separate documentation section or contact support.
π Need Help?
π¬ Our team is here to assist you.
- π§ Email: [email protected]
- π Portal: https://portal.robosms.pk