Home / API

API Documentation

Use your API key to integrate INS with external websites or Telegram bots. Simple HTTPS + JSON.

Simple, Powerful REST API

Use your API key to integrate with external websites or Telegram bots. No SDK required.

  • Clean REST endpoints with JSON
  • API key authentication via x-api-key header
  • Built-in pagination on list endpoints
  • Filter SMS by number, platform and date
  • Live statistics endpoint
  • Detailed error responses & status codes
  • Free API access for all registered users

Base URL & Auth

http://203.161.58.20/api/functions/agent-api

Headers

x-api-key: your_api_key

Response Format

{
  "ok": true,
  "data": [...],
  "pagination": { "page": 1, "limit": 100, "total": 0, "total_pages": 0 }
}

SDK Support

Any HTTP client works โ€” see language examples below.

Endpoints

Available Endpoints

Two core endpoints power most integrations. Send your x-api-key header with every request.

1. GET /otp โ€” Get SMS Messages

GET /otp?page=1&limit=100&number=216&platform=WhatsApp&since=2026-01-01
x-api-key: your_api_key

Query Parameters

page      (optional) page number, default 1
limit     (optional) results per page, default 100
number    (optional) filter by phone number / country code
platform  (optional) filter by platform (e.g. WhatsApp, Facebook)
since     (optional) ISO date, e.g. 2026-01-01

Response

{
  "ok": true,
  "data": [
    {
      "id": "msg_9x8y7z",
      "number": "+21650123456",
      "platform": "WhatsApp",
      "from": "WhatsApp",
      "text": "Your WhatsApp code is 924183",
      "otp": "924183",
      "received_at": "2026-07-10T18:12:47Z"
    }
  ],
  "pagination": { "page": 1, "limit": 100, "total": 1, "total_pages": 1 }
}

2. GET /stats โ€” Statistics

GET /stats
x-api-key: your_api_key

Response

{
  "ok": true,
  "data": { "total_sms": 128450, "today_sms": 1187, "numbers": 320, "users": 2140 }
}
Code Examples

Quick Integration in Any Language

cURL

curl -H "x-api-key: your_api_key" \
  "http://203.161.58.20/api/functions/agent-api/otp?page=1&limit=100&platform=WhatsApp"

PHP (cURL)

$ch = curl_init("http://203.161.58.20/api/functions/agent-api/otp?page=1&limit=100&platform=WhatsApp");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["x-api-key: your_api_key"]
]);
$result = json_decode(curl_exec($ch), true);

Python (requests)

import requests
r = requests.get(
    "http://203.161.58.20/api/functions/agent-api/otp",
    headers={"x-api-key": "your_api_key"},
    params={"page": 1, "limit": 100, "platform": "WhatsApp"}
)
print(r.json())

Node.js (fetch)

const res = await fetch(
  "http://203.161.58.20/api/functions/agent-api/otp?page=1&limit=100&platform=WhatsApp",
  { headers: { "x-api-key": "your_api_key" } }
);
const data = await res.json();

Get Your API Key

API keys are available inside your INS customer portal under Settings โ†’ API Access. All API access is free.

Go to Portal

Build with the INS API

Grab your API key, call /otp or /stats, and go live in minutes.

Get an API Key