Check portability
Pre-flight portability check: whether each number can be ported in and whether it qualifies for FastPort, BEFORE the user commits to a port order (LOA, invoice, service address). Read-only; creates no order and bills nothing.
API key authentication - use your Zernio API key as a Bearer token
In: header
E.164 numbers to check, e.g. +13035550000.
1 <= items <= 50Response 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.checkPhoneNumberPortability({ body: { phoneNumbers: [ 'string', ], },});console.log(data);{
"results": [
{
"phoneNumber": "string",
"portable": true,
"fastPortable": true,
"notPortableReason": "string"
}
]
}{
"error": "Unauthorized"
}Check country availability GET
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 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. Call this before starting the KYC form for regulated countries.
Purchase phone number POST
Initiate purchasing a phone number. Payment-first flow: the user does not pick a specific number. The system either creates a Stripe Checkout Session (first number) or increments the existing subscription quantity and provisions inline (subsequent numbers). Requires a paid plan. The maximum number of phone numbers is determined by the user's plan.