ZapOTP
API v1
Changelog Support Get API Key
API Reference

ZapOTP API

Integrate virtual number rentals and real-time OTP delivery into your application with a clean, RESTful interface.

Operational
REST / JSON
Bearer Auth

Authentication

All API requests require your unique API Key. You can generate one from your API Settings dashboard.

Option 1 — Authorization Header (Recommended)
Header
Authorization: Bearer YOUR_API_KEY
Option 2 — Query Parameter
🔗URL
https://zapotp.com/account/api/v1/user?api_key=YOUR_API_KEY

Base URL

All endpoint paths are relative to this base URL:

🔗Base URL
https://zapotp.com/account/api/v1

Get User Balance

Returns the current wallet balance and account information for the authenticated user.

GET/user
Request
cURL
Python
Node.js
curl -X GET "https://zapotp.com/account/api/v1/user" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests

url = "https://zapotp.com/account/api/v1/user"
headers = { "Authorization": "Bearer YOUR_API_KEY" }

response = requests.get(url, headers=headers)
print(response.json())
const res  = await fetch("https://zapotp.com/account/api/v1/user", {
headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);
Response
{}JSON
{
"status": "success",
"data": {
"username": "john",
"balance": 5000.00,
"currency": "NGN"
}
}

Get Services

Lists all available services for a country, or retrieves pools for a specific service. Pass only country to browse all services, or add service to drill into pool details.

GET/services
Query Parameters
Parameter Type Description
service optional string Service identifier — e.g. whatsapp, telegram. Omit to list all services.
countryrequired string ISO country code — e.g. US, GB, NG
providerrequired string "global" or "usa"
Request
cURL
Python
Node.js
## List all services for a country
curl -X GET "https://zapotp.com/account/api/v1/services?country=US" \
-H "Authorization: Bearer YOUR_API_KEY"

## Get pools for a specific service
curl -X GET "https://zapotp.com/account/api/v1/services?service=whatsapp&country=US" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests

url = "https://zapotp.com/account/api/v1/services"
params = { "service": "whatsapp", "country": "US" }
headers = { "Authorization": "Bearer YOUR_API_KEY" }

response = requests.get(url, params=params, headers=headers)
print(response.json())
const params = new URLSearchParams({ service: "whatsapp", country: "US" });
const res = await fetch(`https://zapotp.com/account/api/v1/services?${params}`, {
headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);
Response
{}JSON
// List all services (country only)
{
"status": "success",
"data": [
{
"service_id": "whatsapp",
"service_name": "WhatsApp",
"price": 450.00
},
{
"service_id": "telegram",
"service_name": "Telegram",
"price": 350.00
}
]
}

// Specific service + country (pools)
{
"status": "success",
"data": [
{
"pool": "1",
"name": "Standard Pool",
"success_rate": 85,
"price": 450.00,
"count": 120
}
]
}

Buy Number

Rents a virtual phone number for OTP reception. Returns an order ID and phone number that you can poll for incoming SMS messages.

POST/rent
Body Parameters (JSON)
Parameter Type Description
actionrequired string Must be "rent"
servicerequired string Service ID — e.g. whatsapp
countryrequired string ISO country code
providerrequired string "global" or "usa"
durationoptional string e.g. "generic"
Request
cURL
Python
Node.js
curl -X POST "https://zapotp.com/account/api/v1/rent" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"action":"rent","service":"whatsapp","country":"US","provider":"global","duration":"generic"}'
import requests

url = "https://zapotp.com/account/api/v1/rent"
headers = {"Authorization":"Bearer YOUR_API_KEY", "Content-Type":"application/json"}
payload = {"action":"rent","service":"whatsapp","country":"US","provider":"global","duration":"generic"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const res = await fetch("https://zapotp.com/account/api/v1/rent", {
method: "POST",
headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" },
body: JSON.stringify({ action: "rent", service: "whatsapp", country: "US", provider: "global", duration: "generic" })
});
const data = await res.json();
console.log(data);
Response
{}JSON
{
"status": "success",
"data": {
"order_id": "12345678",
"number": "15550123456",
"price": 450.00,
"expiry": "2024-02-06 12:30:00"
}
}

Get SMS Code

Polls for the OTP received on a rented number.

GET/sms
Query Parameters
Parameter Type Description
order_idrequired string Order ID
PENDING RECEIVED CANCELED FINISHED
cURL
Python
Node.js
curl -X GET "https://zapotp.com/account/api/v1/sms?order_id=12345678" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests, time

url = "https://zapotp.com/account/api/v1/sms"
headers = { "Authorization": "Bearer YOUR_API_KEY" }
params = { "order_id": "12345678" }
while True:
r = requests.get(url, params=params, headers=headers).json()
if r["data"]["status"] == "RECEIVED":
print("OTP:", r["data"]["sms_code"])
break
time.sleep(5)
async function pollOTP(orderId) {
while (true) {
const res = await fetch(`https://zapotp.com/account/api/v1/sms?order_id=${orderId}`, {
headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const json = await res.json();
if (json.data.status === "RECEIVED") return json.data.sms_code;
await new Promise(r => setTimeout(r, 5000));
}
}
pollOTP("12345678").then(console.log);
Response
{}JSON
{
"status": "success",
"data": {
"order_id": "12345678",
"sms_code": "123-456",
"status": "RECEIVED"
}
}

List Orders

Returns all orders placed under your account, including their current status and pricing.

GET/orders
cURL
Python
Node.js
curl -X GET "https://zapotp.com/account/api/v1/orders" \
-H "Authorization: Bearer YOUR_API_KEY"
import requests

url = "https://zapotp.com/account/api/v1/orders"
headers = { "Authorization": "Bearer YOUR_API_KEY" }
response = requests.get(url, headers=headers)
print(response.json())
const res  = await fetch("https://zapotp.com/account/api/v1/orders", {
headers: { "Authorization": "Bearer YOUR_API_KEY" }
});
const data = await res.json();
console.log(data);
Response
{}JSON
{
"status": "success",
"data": [
{
"id": 101,
"order_id": "12345678",
"service": "whatsapp",
"number": "15550123456",
"status": "FINISHED",
"price": 450.00
}
]
}