Home / API

Developer API

Automate SMS verification and virtual number rental with our REST API. Simple HTTPS + JSON. Works with every programming language.

Simple, Powerful REST API

Our API lets developers rent numbers, check SMS inbox, cancel rentals and receive real-time webhooks — all through simple HTTPS JSON calls. No SDK required. Works with Python, PHP, Node.js, Go, Ruby, Java, .NET, or any language that can call HTTP.

  • Clean REST endpoints with JSON
  • Bearer token authentication
  • Real-time webhooks for received SMS
  • Sandbox environment for testing
  • Rate-limit headers on every response
  • Detailed error responses & status codes
  • OpenAPI (Swagger) spec available
  • Free API access for all registered users

Base URL & Auth

https://api.ins-service.com/v1/

Authentication

Authorization: Bearer YOUR_API_KEY

Rate Limits

Standard: 300 req/min · Carrier / SMPP partners: 1500 req/min · Custom limits available on request — all free.

SDK Support

Official SDKs planned for Node.js, Python and PHP. Meanwhile, any HTTP client works — see examples below.

Endpoints

Core API Reference

The key endpoints most integrations use. See the full docs in your customer portal for the complete reference.

1. Rent a Number

POST /v1/numbers/rent
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "country": "US",
  "service": "facebook",
  "duration": "single"
}

Response

{
  "success": true,
  "data": {
    "rental_id": "rnt_a1b2c3",
    "phone": "+15552004571",
    "country": "US",
    "service": "facebook",
    "expires_at": "2026-07-10T18:30:00Z"
  }
}

2. Check SMS Inbox

GET /v1/rentals/rnt_a1b2c3/messages
Authorization: Bearer YOUR_API_KEY

Response

{
  "success": true,
  "data": [
    {
      "id": "msg_9x8y7z",
      "from": "Facebook",
      "text": "Your Facebook code is 924183",
      "otp": "924183",
      "received_at": "2026-07-10T18:12:47Z"
    }
  ]
}

3. Cancel a Rental

POST /v1/rentals/rnt_a1b2c3/cancel
Authorization: Bearer YOUR_API_KEY

4. List Available Services & Countries

GET /v1/services
GET /v1/countries
Authorization: Bearer YOUR_API_KEY

5. Account Usage & Stats

GET /v1/account/usage
Authorization: Bearer YOUR_API_KEY

Response:
{
  "success": true,
  "data": { "rentals_this_month": 1240, "sms_received": 1187 }
}

Webhooks

Configure a webhook URL in your customer portal to receive real-time notifications the moment an SMS arrives on any of your active rentals. Webhooks include the full SMS text and the extracted OTP.

POST https://yourdomain.com/webhook
Content-Type: application/json
X-INS-Signature: sha256=abc123...

{
  "event": "sms.received",
  "rental_id": "rnt_a1b2c3",
  "phone": "+15552004571",
  "from": "Facebook",
  "text": "Your Facebook code is 924183",
  "otp": "924183",
  "received_at": "2026-07-10T18:12:47Z"
}

Every webhook is signed with your webhook secret using HMAC-SHA256. Verify the X-INS-Signature header on your server before trusting the payload.

Code Examples

Quick Integration in Any Language

PHP (cURL)

$ch = curl_init("https://api.ins-service.com/v1/numbers/rent");
curl_setopt_array($ch, [
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => [
    "Authorization: Bearer YOUR_API_KEY",
    "Content-Type: application/json"
  ],
  CURLOPT_POSTFIELDS => json_encode([
    "country" => "US", "service" => "facebook", "duration" => "single"
  ])
]);
$result = json_decode(curl_exec($ch), true);
echo $result["data"]["phone"];

Python (requests)

import requests

r = requests.post(
    "https://api.ins-service.com/v1/numbers/rent",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={"country": "US", "service": "facebook", "duration": "single"}
)
print(r.json()["data"]["phone"])

Node.js (fetch)

const res = await fetch("https://api.ins-service.com/v1/numbers/rent", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({ country: "US", service: "facebook", duration: "single" })
});
const data = await res.json();
console.log(data.data.phone);

Get Your API Key

API keys are available inside your INS customer portal under Settings → API Access. All API access is free — sandbox and production keys are provisioned instantly on signup.

Go to Portal

Build with the INS API

Rent your first number, receive your first OTP, and go live in minutes.

Get an API Key