OnlineSMSService - SMS Gateway India

Fast, reliable SMS gateway for businesses

SMS API Playground

Test our SMS gateway API with our interactive playground. Try different endpoints, parameters, and see real-time responses.

Test SMS API

POST /api/v1/send

Request

Response

Click "Send Test SMS" to see the response
curl -X POST "https://onlinesmsservice.com/api/v1/send" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "to": "919999999999",
    "message": "Hello! This is a test message.",
    "type": "transactional",
    "sender_id": "DEMO"
  }'

                                
const axios = require('axios');

const response = await axios.post('https://onlinesmsservice.com/api/v1/send', {
    to: '919999999999',
    message: 'Hello! This is a test message.',
    type: 'transactional',
    sender_id: 'DEMO'
}, {
    headers: {
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_API_KEY'
    }
});

console.log(response.data);
import requests

url = 'https://onlinesmsservice.com/api/v1/send'
headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY'
}
data = {
    'to': '919999999999',
    'message': 'Hello! This is a test message.',
    'type': 'transactional',
    'sender_id': 'DEMO'
}

response = requests.post(url, json=data, headers=headers)
print(response.json())

API Documentation

Send SMS

POST /api/v1/send

Request Parameters

Parameter Type Required Description
to string Yes Recipient phone number (with country code)
message string Yes SMS message content
type string Yes Message type: 'transactional' or 'promotional'
sender_id string No Sender ID (6 characters max)

Response

{
  "success": true,
  "message_id": "MSG_123456789",
  "status": "sent",
  "cost": 0.12,
  "balance": 999.88
}