OverviewProductsPlatformsAPI ReferenceResources
Phone Numbers

Check country availability

GEThttps://zernio.com/api/v1/phone-numbers/availability

Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Call this before starting the KYC form for regulated countries.

It tells you whether we have deliverable inventory, and what address the customer needs:

  • addressConstraint: geo: the registered address MUST be in one of the returned areas (the only place we have stock). A different-area address passes pre-approval but the number can never be assigned.
  • addressConstraint: country: any in-country address works.
  • addressConstraint: none: field-only / instant country, no address.

Authentication

AuthorizationBearer tokenRequired

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

Query parameters

countrystringRequired

ISO-2 country code.

numberTypestringOne of local | mobile | national | toll_free

Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.

smsboolean

Pass true when the buyer wants SMS: availability, areas, and areaOptions then describe the SMS-capable pool (an SMS purchase orders from it), not the wider voice-only pool.

Responses

Success· the request worked

Errors· the request failed

How it behaves

Without an API key

It answers from cache only and returns just country, numberType and areaOptions, for building an area picker before signup.

GET/v1/phone-numbers/availability
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.phonenumbers.checkPhoneNumberAvailability({  query: {    country: 'string',  },});console.log(data);
{  "country": "string",  "numberType": "string",  "available": true,  "preOrderable": true,  "addressConstraint": "geo",  "areas": [    "string"  ],  "areaOptions": [    {      "ndc": "string",      "name": "string",      "count": 0    }  ],  "soldOutAreas": [    {      "ndc": "string",      "name": "string",      "preOrderable": true    }  ],  "areaAvailability": {    "inStock": [      {        "ndc": "string",        "name": "string",        "count": 0,        "ndcs": [          "string"        ],        "aliases": [          "string"        ]      }    ],    "preOrder": [      {        "ndc": "string",        "name": "string",        "ndcs": [          "string"        ],        "aliases": [          "string"        ]      }    ],    "outOfStock": [      {        "ndc": "string",        "name": "string",        "listed": 0,        "ndcs": [          "string"        ],        "aliases": [          "string"        ]      }    ]  }}
OpenAPI specification
Was this page helpful?