API Documentation

Public – No login required

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

ParameterTypeRequiredDescription
sender_idstringRequiredYour User ID
numbersstringRequired10-digit mobile number
routstringRequired"sms" or "waninza"
variables_valuesstringOptional*OTP (4-6 digits) – for SMS/WhatsApp OTP
messagestringOptional*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

ErrorStatusDescription
Invalid API Key401API key is incorrect or missing
Insufficient Balance402Not enough balance
Too many requests429Rate 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.