Send SMS
The Send SMS API allow you to send promotional and transactional messages to single or multiple numbers.
Endpoint
GET https://api.onlinesmsservice.com/send
Parameters
| Parameter | Type | Description |
|---|---|---|
apikey |
String | Your API Key (Required) |
sender |
String | 6-character Sender ID (e.g., OSSSMS) |
to |
String | Mobile number(s) (comma separated for bulk) |
message |
String | URL encoded message content |
Example Request
$apiKey = "YOUR_API_KEY";
$sender = "OSSSMS";
$mobile = "919876543210";
$message = urlencode("Hello! This is a test message.");
$url = "https://api.onlinesmsservice.com/send?apikey=$apiKey&sender=$sender&to=$mobile&message=$message";
$response = file_get_contents($url);
Example Response
{
"status": "success",
"message_id": "MSG12345678",
"credits_used": 1
}