List services, place orders, poll for OTPs, and cancel numbers with a simple JSON API — same wallet and order engine as the dashboard.
Authenticate with Bearer YOUR_API_KEY from your dashboard.
Same wallet, catalog, SmsOrder engine, and SMS polling as the UI.
Poll order status until SMS codes are delivered.
Structured success/error responses with machine-readable codes.
curl -X POST https://nonvoipservice.com/api/v1/buy/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id-123" \
-d '{"type": "usa1", "service_id": 1}'
const API_KEY = process.env.NONVOIP_API_KEY;
// List USA-1 services (same catalog as dashboard Temp Number USA-1)
const servicesRes = await fetch("https://nonvoipservice.com/api/v1/services/?type=usa1", {
headers: { Authorization: `Bearer ${API_KEY}` },
});
const { services } = await servicesRes.json();
// Place an order (charges the same wallet as the dashboard)
const orderRes = await fetch("https://nonvoipservice.com/api/v1/buy/", {
method: "POST",
headers: {
Authorization: `Bearer ${API_KEY}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({ type: "usa1", service_id: services[0].id }),
});
const order = await orderRes.json();
// Poll until OTP arrives
let status = order;
while (status.status === "pending") {
await new Promise((r) => setTimeout(r, 3000));
const res = await fetch(
`${API_BASE}/status/?order_id=${order.order_id}`,
{ headers: { Authorization: `Bearer ${API_KEY}` } },
);
status = await res.json();
}
console.log("OTP:", status.code || status.otp);
import os, time, requests
API_KEY = os.environ["NONVOIP_API_KEY"]
headers = {"Authorization": f"Bearer {API_KEY}"}
services = requests.get(
"https://nonvoipservice.com/api/v1/services/?type=usa1", headers=headers
).json()["services"]
order = requests.post(
"https://nonvoipservice.com/api/v1/buy/",
headers={**headers, "Content-Type": "application/json", "Idempotency-Key": "demo-1"},
json={"type": "usa1", "service_id": services[0]["id"]},
).json()
status = order
while status.get("status") == "pending":
time.sleep(3)
status = requests.get(
f"https://nonvoipservice.com/api/v1/status/",
headers=headers,
params={"order_id": order["order_id"]},
).json()
print("OTP:", status.get("code") or status.get("otp"))
<?php
$apiKey = getenv('NONVOIP_API_KEY');
$headers = [
"Authorization: Bearer $apiKey",
"Content-Type: application/json",
];
$ch = curl_init("https://nonvoipservice.com/api/v1/services/?type=usa1");
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => $headers,
CURLOPT_RETURNTRANSFER => true,
]);
$services = json_decode(curl_exec($ch), true)['services'];
$ch = curl_init("https://nonvoipservice.com/api/v1/buy/");
curl_setopt_array($ch, [
CURLOPT_HTTPHEADER => array_merge($headers, ["Idempotency-Key: demo-1"]),
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => json_encode([
"type" => "usa1",
"service_id" => $services[0]['id'],
]),
CURLOPT_RETURNTRANSFER => true,
]);
$order = json_decode(curl_exec($ch), true);
echo $order['order_id'];
/api/v1/balance/
AUTH REQUIRED
Returns the same NonVoipService wallet balance shown in the dashboard.
{
"success": true,
"balance": "12.34",
"currency": "USD"
}
curl "https://nonvoipservice.com/api/v1/balance/" \ -H "Authorization: Bearer YOUR_API_KEY"
/api/v1/countries/
AUTH REQUIRED
Same country picker list as dashboard Global Temp Number. Use the returned name as country= on /services/?type=global. USA routes use type=usa1/usa2/usa3 instead.
{
"success": true,
"countries": [{ "code": "43", "name": "Germany", "service_count": 1048 }],
"count": 200
}
curl "https://nonvoipservice.com/api/v1/countries/" \ -H "Authorization: Bearer YOUR_API_KEY"
/api/v1/services/
AUTH REQUIRED
Returns the same live catalog as the dashboard for the given type. Use type=usa1, usa2, usa3, global, longterm, or dedicated. Pass country when type=global (exact name from /countries/). Optional pagination: page & limit (or page_size). Optional search: q.
{
"success": true,
"services": [{ "id": 1, "service_code": "wa", "name": "WhatsApp", "price": "0.45", "currency": "USD", "server": 1 }],
"count": 1
}
curl "https://nonvoipservice.com/api/v1/services/?type=usa1" \ -H "Authorization: Bearer YOUR_API_KEY"
/api/v1/buy/
AUTH REQUIRED
Creates a real SmsOrder using the same engines as the dashboard. Charges your wallet. Optional Idempotency-Key header prevents duplicate charges on retries.
{ "type": "usa1", "service_id": 1, "area_code": "Random Location" }
// global also needs "country": "United States"
// longterm may use "product": "usa-1d"
{
"success": true,
"order_id": "123",
"id": 123,
"number": "+12125550123",
"status": "pending",
"balance": "9.55",
"currency": "USD"
}
curl -X POST https://nonvoipservice.com/api/v1/buy/ \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: unique-request-id-123" \
-d '{"type": "usa1", "service_id": 1}'
/api/v1/order/
AUTH REQUIRED
Same as POST /buy/ - identical request body and response. Prefer /buy/ or /order/; both hit the dashboard order engine.
{ "type": "usa1", "service_id": 1 }
{
"success": true,
"order_id": "123",
"number": "+12125550123",
"status": "pending",
"balance": "9.55"
}
curl -X POST "https://nonvoipservice.com/api/v1/order/" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type": "usa1", "service_id": 1}'
/api/v1/status/
AUTH REQUIRED
Poll order status and OTP. Refreshes SMS from the same path as the dashboard. Status values: pending, received, cancelled, timeout.
{
"success": true,
"order_id": "123",
"status": "received",
"number": "+12125550123",
"code": "842197",
"otp": "842197",
"cancel_available": false
}
curl "https://nonvoipservice.com/api/v1/status/?order_id=123" \ -H "Authorization: Bearer YOUR_API_KEY"
/api/v1/order/{id}/
AUTH REQUIRED
Same as GET /status/?order_id={id}.
{
"success": true,
"order_id": "123",
"status": "pending",
"number": "+12125550123",
"code": "",
"otp": null,
"cancel_available": true
}
curl "https://nonvoipservice.com/api/v1/order/123/" \ -H "Authorization: Bearer YOUR_API_KEY"
/api/v1/sms/
AUTH REQUIRED
Returns extracted OTP code and SMS text when available (same SMS engine as the dashboard).
{
"success": true,
"order_id": "123",
"code": "842197",
"sms": "Your code is 842197",
"status": "received"
}
curl "https://nonvoipservice.com/api/v1/sms/?order_id=123" \ -H "Authorization: Bearer YOUR_API_KEY"
/api/v1/cancel/
AUTH REQUIRED
Cancel a pending order and refund to the same wallet. Same cancel timer rules as the dashboard: too-early cancels return ORDER_CANCEL_TOO_EARLY. You can only cancel your own orders. Completed orders cannot be cancelled.
{ "order_id": "123" }
{
"success": true,
"status": "cancelled",
"refund": "0.45",
"refunded": 0.45,
"balance": "10.00"
}
curl -X POST "https://nonvoipservice.com/api/v1/cancel/" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"order_id": "123"}'
/api/v1/order/{id}/cancel/
AUTH REQUIRED
Same as POST /cancel/ with body order_id.
{
"success": true,
"status": "cancelled",
"refund": "0.45",
"balance": "10.00"
}
curl -X POST "https://nonvoipservice.com/api/v1/order/123/cancel/" \ -H "Authorization: Bearer YOUR_API_KEY"
/api/v1/renew/
AUTH REQUIRED
Request another SMS on an eligible short-term order (premium USA-1 + USA-3 / Global Server-3). Renew stays available while the order is pending/completed; after the first OTP it charges the original sell price again. Not available for USA-2 / Server-2 / long-term.
{ "order_id": "123" }
{
"success": true,
"order_id": "123",
"number": "+12125550123",
"status": "pending",
"renewed": true
}
curl -X POST "https://nonvoipservice.com/api/v1/renew/" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"order_id": "123"}'
https://nonvoipservice.com/api/v1
All /api/v1/ endpoints require Authorization: Bearer YOUR_API_KEY (or ?api_key=). Generate or regenerate your key from the dashboard under API Key. Regenerating invalidates the previous key immediately.
Enforced at 60 requests per second per API key (HTTP 429 with RATE_LIMITED when exceeded).
Errors return {"success": false, "error": "CODE", "message": "…"}. Common codes: INVALID_API_KEY, INSUFFICIENT_BALANCE, NUMBER_UNAVAILABLE, SERVICE_NOT_FOUND, ORDER_NOT_FOUND, ORDER_ALREADY_COMPLETED, RATE_LIMITED. Status codes: 400 validation/balance/stock, 401 invalid key, 404 not found, 429 rate limited.