Quickstart & Base Endpoint
Wire protocol and global API parameters
The NexNum Public API v1 implements a high-throughput, provider-compatible wire protocol. All requests originate from the primary base URL:
Used for single line responses like `ACCESS_NUMBER` and `ACCESS_BALANCE` for direct legacy compatibility.
Used for structured catalog lookups (`getPrices`, `getServicesList`, `getCountriesList`).
Authentication & API Keys
Securing your requests with Bearer Tokens
Authenticate your requests using an API Key generated from your NexNum User Dashboard. You can provide your key in two ways:
API Action References
Detailed documentation for all 9 v1 provider actions
Get Wallet Balance
Retrieves current available wallet credit balance for the authenticated user API key in formatted currency units.
Code Examples
curl -X GET "https://nexnum.in/api/v1?action=getBalance&api_key=YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"Response Sample (text/plain)
ACCESS_BALANCE:25.50Purchase Virtual Number
Allocates a new virtual line from real SIM carrier inventory for a specific service and country.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| service | string | number | Yes | Target service code (e.g. wa, tg, go) or numeric service ID. |
| country | string | number | Yes | Target country code (e.g. in, us, uk) or numeric country ID. |
| operator | string | number | Optional | Optional carrier operator filter code. |
| maxPrice | number | Optional | Maximum acceptable price in points. Rejects offer if cost exceeds this cap. |
Code Examples
curl -X GET "https://nexnum.in/api/v1?action=getNumber&api_key=YOUR_API_KEY&service=wa&country=in" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"Response Sample (text/plain)
ACCESS_NUMBER:98472910:+919876543210Set Activation Status
Updates activation line lifecycle state (mark ready, retry code, complete line, or cancel & refund).
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Active activation ID returned during getNumber. |
| status | number | Yes | Status code: 1 (Ready), 3 (Retry Code), 6/8 (Complete), -1 (Cancel & Refund). |
Code Examples
curl -X GET "https://nexnum.in/api/v1?action=setStatus&api_key=YOUR_API_KEY&id=98472910&status=6" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"Response Sample (text/plain)
ACCESS_ACTIVATIONPoll Received SMS & Code
Polls real-time SMS inbox for an active line to inspect verification codes and delivery state.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Target activation ID. |
Code Examples
curl -X GET "https://nexnum.in/api/v1?action=getStatus&api_key=YOUR_API_KEY&id=98472910" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"Response Sample (application/json)
{
"status": true,
"message": "STATUS_OK:847291"
}List Supported Services
Returns list of all 500+ supported services with numeric IDs, names, codes, and icon paths.
Code Examples
curl -X GET "https://nexnum.in/api/v1?action=getServicesList&api_key=YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"Response Sample (application/json)
{
"services": [
{ "id": 1, "name": "WhatsApp", "code": "wa", "serviceIcon": "/assets/icons/services/wa.svg" },
{ "id": 2, "name": "Telegram", "code": "tg", "serviceIcon": "/assets/icons/services/tg.svg" }
]
}List Supported Countries
Returns list of all 180+ supported countries with numeric IDs, ISO codes, and flag icons.
Code Examples
curl -X GET "https://nexnum.in/api/v1?action=getCountriesList&api_key=YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"Response Sample (application/json)
{
"countries": [
{ "id": 1, "name": "India", "code": "in", "flagIcon": "/assets/icons/flags/in.svg" },
{ "id": 2, "name": "United States", "code": "us", "flagIcon": "/assets/icons/flags/us.svg" }
]
}Get Real-Time Price Matrix
Returns live carrier prices, available line counts, and provider breakdown grouped by country and service.
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| country | string | number | Optional | Filter matrix by specific country code or ID. |
| service | string | number | Optional | Filter matrix by specific service code or ID. |
Code Examples
curl -X GET "https://nexnum.in/api/v1?action=getPrices&api_key=YOUR_API_KEY&country=in&service=wa" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"Response Sample (application/json)
{
"1": {
"1": {
"price": 5.00,
"count": 1420,
"providers": {
"1000": { "count": 1420, "price": 5.00, "provider_id": "1000", "provider_name": "GrizzlySMS" }
}
}
}
}Get Active User Lines
Returns real-time status and message histories for all active numbers owned by the API key user.
Code Examples
curl -X GET "https://nexnum.in/api/v1?action=getNumbersStatus&api_key=YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"Response Sample (application/json)
{
"98472910": {
"phone": "+919876543210",
"countryId": 1,
"countryName": "India",
"serviceName": "WhatsApp",
"status": "received",
"sms": [
{ "sender": "WhatsApp", "code": "847291", "content": "Your code is 847291", "receivedAt": "2026-07-30T15:30:00Z" }
]
}
}List Active Carrier Networks
Returns registry of active carrier networks and provider codes currently supplying SMS routes.
Code Examples
curl -X GET "https://nexnum.in/api/v1?action=getProviders&api_key=YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Accept: application/json"Response Sample (application/json)
{
"providers": [
{ "id": "1000", "name": "GrizzlySMS" },
{ "id": "1001", "name": "5sim" }
]
}Interactive API Playground
Test parameters and generate custom requests
Error Codes Reference
Standard API error messages & resolution steps
| Error Code | HTTP | Description & Resolution |
|---|---|---|
| NO_KEY | 200 / 401 | API key was not supplied in header or query string. |
| BAD_KEY | 200 / 403 | API key is invalid, disabled, or lacks required permission scope. |
| BAD_SERVICE | 200 | Invalid service or country code supplied during getNumber. |
| NO_NUMBERS | 200 | No available carrier lines matching filter or price exceeds maxPrice cap. |
| NO_BALANCE | 200 | Insufficient wallet credit balance to complete purchase. |
| NO_ACTIVATION | 200 | Activation ID not found or not owned by user API key. |