Check country availability
Pre-purchase check, so you can warn BEFORE a customer invests in KYC (regulated review is async, 1-3 days). Tells you whether we have deliverable inventory, and what address the customer needs:
addressConstraint: geo→ the registered address MUST be in one of the returnedareas(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. Call this before starting the KYC form for regulated countries.
Without an API key it answers from cache only and returns just
country, numberType and areaOptions, for building an area
picker before signup.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Query Parameters
ISO-2 country code.
Check a specific offered type (stock and address constraints are per type). Omitted = the country's default type.
Value in
- "local"
- "mobile"
- "national"
- "toll_free"
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.
Response Body
application/json
application/json
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" ] } ] }}List offerable number countries
The phone number countries available to purchase, each with its flat monthly price (cents), regulatory tier, whether it needs end-user KYC (Tier 3/4), and per-feature availability (PSTN calls, WhatsApp, SMS, and WhatsApp Business Calling outbound). Drives the country picker. Tier-4 countries appear only when enabled. No API key needed: the catalog is public so you can browse it before you have an account.
Search available numbers
Search the provider's inventory for numbers available to purchase in a country (default US). Optional filters narrow the results. The country must be offerable (see GET /v1/phone-numbers/countries). Voice capability is always required; pass `sms=true` to only see numbers that can also text (SMS support is per-number, not per-country). Numbers a purchase would refuse are left out, and any result's `phoneNumber` can be bought exactly by passing it to POST /v1/phone-numbers/purchase. Works without an API key. Keyless calls get up to 12 results with the middle digits masked (`maskedNumber`), each with a `claimId` and a `claimUrl`: a signup link that lands a person on the dashboard's confirm step with that number picked, so an agent can search for a user and hand them one link. Keyless calls are rate limited per IP and results are cached for a few minutes. With an API key you get full numbers and no claim fields.