Developers Guide

API Documentation

Need help with API setup?

Start Chat

Secure Bearer-authenticated API for STR, LTR, and Dedicated orders.

Get your API key

Create your key from Dashboard → API & use it for authentication.

Order and track with API

Place orders, track status, and view order history.

Introduction

Same as the web app

API orders appear in your dashboard, use the same wallet balance, and follow the same order rules as web orders.

The NonVoIP User API lets you check your account balance, list services, create orders, read SMS messages, and receive webhook events.

Base URL

All relative paths in this documentation are under the base URL below. Endpoint cards show relative paths; cURL examples use the full URL.

Example
https://nonvoip.com/api/v1

Authentication

Every request requires a Bearer API key. Create and manage API keys in Dashboard → API.

Example
Authorization: Bearer nv_live_your_api_key
Accept: application/json
Content-Type: application/json

Required Headers

Authorization: Bearer <api_key> — required on every request.

Accept: application/json — recommended on every request.

Content-Type: application/json — required for POST/PATCH requests with a JSON body.

Idempotency-Key — required for create order requests to prevent duplicate charges.

Example
Authorization: Bearer nv_live_your_api_key
Accept: application/json
Content-Type: application/json
Idempotency-Key: order-create-unique-id-123

Response Envelope

Successful responses set success to true and place the response payload in data.

JSON
{
  "success": true,
  "data": { },
  "error": null,
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2026-07-10T12:00:00.000Z"
  }
}

Error Response

Failed responses set success to false. Use error.code for programmatic handling; details may include additional context.

JSON
{
  "success": false,
  "data": null,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Request validation failed.",
    "details": { "fields": { "quoted_price": "Invalid format" } }
  },
  "meta": {
    "request_id": "req_abc123",
    "timestamp": "2026-07-10T12:00:00.000Z"
  }
}

API Error Codes

Common User API error codes. See endpoint cards for additional codes.

CodeHTTPWhen
AUTH_REQUIRED401Authorization header is missing or malformed.
INVALID_API_KEY401API key is invalid or revoked.
API_KEY_EXPIRED401API key has expired. Create a new API key.
IP_NOT_WHITELISTED403Request IP is not allowed by your account API whitelist.
VALIDATION_ERROR422Request body, query, or parameters are invalid.
IDEMPOTENCY_KEY_REQUIRED400Idempotency-Key header is required for this request.
IDEMPOTENCY_CONFLICT409The same Idempotency-Key was used with different request data.
INSUFFICIENT_BALANCE422Wallet balance is too low for this order action.
OUT_OF_STOCK422No eligible stock or route for this service or offer before a number is assigned.
NO_NUMBER_AVAILABLE409Order could not get a number after allocation. Wallet was not charged.
OFFER_UNAVAILABLE422Selected offer is currently unavailable. Re-fetch the catalog and try again.
PRICE_CHANGED409Current price is higher than quoted_price. Confirm the new price and retry.
ORDER_CANCEL_NOT_AVAILABLE422Order cannot be cancelled in its current state (including dedicated cancel before the 5-minute gate).
RENEW_NOT_AVAILABLE422Renew or auto-renew is not available for this order yet.
REUSE_NOT_AVAILABLE422Short-term reuse (renew) is not available for this order. Check can_reuse_session or can_extend_session, then call POST /orders/:id/reuse.
EXTEND_NOT_AVAILABLE422Legacy extend path is not available. Prefer POST /orders/:id/reuse when either renew flag is true.
ORDER_HAS_SMS422Refund is not available after a deliverable SMS has been received.
REFUND_WINDOW_EXPIRED422The cancel/refund window has expired.
RATE_LIMIT_EXCEEDED429Too many requests. Wait and retry.
SERVICE_ALLOCATION_COOLDOWN429Allocation failed repeatedly for this offer. Respect Retry-After or choose another available offer.
INTERNAL_ERROR500Unexpected server error.

Rate Limits

Rate limit: 300 requests per minute per account.

If you exceed the limit, the API returns RATE_LIMIT_EXCEEDED with HTTP 429. Use webhooks for SMS delivery and avoid aggressive polling.

Idempotency

Create order requests require a unique Idempotency-Key header. Reusing the same key returns the original result and prevents duplicate charges.

Example
Idempotency-Key: order-create-unique-id-123

Price / Currency

All prices and wallet balances are shown in USD as decimal strings, for example "0.31" or "120.50".

Send quoted_price as the catalog customer_price you showed the customer. If the current price is higher, the API returns 409 PRICE_CHANGED and does not charge — confirm the new price, then retry. If the current price is lower, the order continues and you are charged the lower price.

Pagination

List endpoints use offset pagination with page (default 1) and per_page (default 15; max depends on the endpoint, typically 50).

JSON
{
  "page": 1,
  "per_page": 15,
  "total": 42
}

Timezone

All timestamps are ISO 8601 in UTC, for example 2026-07-10T12:00:00.000Z.

API Versioning

The current version is exposed under the /api/v1 path prefix. Breaking changes are announced; do not rely on undocumented fields.

Quickstart

1. Create an API key in Dashboard → API.

2. Check account and balance — GET /account.

3. List services — GET /products?type=short-term.

4. Create an order — POST /orders.

5. Receive SMS — use a webhook (preferred), or poll GET /orders/:id/messages?sync=0.

Example
curl -s "https://nonvoip.com/api/v1/account" \
  -H "Authorization: Bearer nv_live_your_api_key"

curl -s "https://nonvoip.com/api/v1/products?type=short-term" \
  -H "Authorization: Bearer nv_live_your_api_key"

curl -s -X POST "https://nonvoip.com/api/v1/orders" \
  -H "Authorization: Bearer nv_live_your_api_key" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-create-unique-id-123" \
  -d '{"type":"short-term","service_id":"svc:whatsapp:short_term","offer_id":"off_abc123","quoted_price":"0.31"}'