API Documentation

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:

ParameterTypeDescription
keystringYour API key
maskstringSender mask (e.g., MYCOMPANY)
tostringRecipient mobile number (e.g., 923001234567)
messagestringThe 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:

CodeMeaning
000Message Queued Successfully
100Message Sent Successfully
101Message Sending Failed
102Message Handed to Telecom
200Success Response
201General API Error
202Required Parameters Missing
203Invalid API Key
204Reseller Balance Insufficient
205User Balance Insufficient
206Account Suspended or Blocked
207Invalid Language (Encoding)
208Duplicate Language Error
209Email Blocked
210IP Not Whitelisted
211User Not Found
212Masking Not Authorized
213Character Limit Exceeded
214Character Limit or Invalid Format
215Invalid Number Format (0345…)
216Invalid Number Format (345…)

πŸ›  How to Use Robo SMS API

  1. Sign Up at Robo SMS Portal
  2. Buy Package (Transactional / Marketing)
  3. Get Mask Approved (Sender ID)
  4. Upload Contacts (via Excel or manually)
  5. 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.