SMS API
Developer friendly REST API with powerful features and easy integration.
Overview
Send SMS and OTPs using our simple REST API. All responses are in JSON format.
This API is publicly accessible. Get your API key from the dashboard.
Endpoint
POST
https://ninzasms.in.net/auth/api/send_otp.php
Authentication
Include your API key in the Authorization header.
Authorization: YOUR_API_KEY
Sample Key:
NINZASMS6924f53e3e5e031a13ca
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sender_id | string | Required | Your User ID |
numbers | string | Required | 10-digit mobile number |
rout | string | Required | "sms" or "waninza" |
variables_values | string | Optional* | OTP (4-6 digits) – for SMS/WhatsApp OTP |
message | string | Optional* | Promotional message – for WhatsApp |
* Either variables_values or message must be provided.
Response Format
{
"status": 1,
"msg": "✅ OTP Sent Successfully",
"balance": 4.60
}
{
"status": 0,
"msg": "❌ Insufficient Balance"
}
cURL Example
curl -X POST https://ninzasms.in.net/auth/api/send_otp.php \
-H "Authorization: NINZASMS6924f53e3e5e031a13ca" \
-H "Content-Type: application/json" \
-d '{"sender_id":"14574","numbers":"9876543210","rout":"sms","variables_values":"123456"}'
PHP Example
<?php
$ch = curl_init('https://ninzasms.in.net/auth/api/send_otp.php');
$payload = [
'sender_id' => '14574',
'numbers' => '9876543210',
'rout' => 'sms',
'variables_values' => '123456'
];
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode($payload),
CURLOPT_HTTPHEADER => [
'Authorization: NINZASMS6924f53e3e5e031a13ca',
'Content-Type: application/json'
]
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
JavaScript Example
fetch('https://ninzasms.in.net/auth/api/send_otp.php', {
method: 'POST',
headers: {
'Authorization': 'NINZASMS6924f53e3e5e031a13ca',
'Content-Type': 'application/json'
},
body: JSON.stringify({
sender_id: '14574',
numbers: '9876543210',
rout: 'sms',
variables_values: '123456'
})
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));
Error Codes
| Error | Status | Description |
|---|---|---|
Invalid API Key | 401 | API key is incorrect or missing |
Insufficient Balance | 402 | Not enough balance |
Too many requests | 429 | Rate limit exceeded |
Rate Limits
- Per IP: 50 requests per minute
- Per User: 100 requests per minute
- Daily Limit: 1,000 OTPs per number
Try It
Test the API with your own credentials. Your data is sent to the real API endpoint.