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,
"lineType": "string",
"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
Payment-first: you do not pick a specific number, the system provisions one and auto-assigns it. With usage-based billing active and a payment method on file, the number provisions inline and bills per month on your usage-based invoice (there is no checkout redirect). No payment method on file returns `402 PAYMENT_REQUIRED`; a regulated country returns `202` with `status: "kyc_required"` and a `kycUrl`. Requires usage-based billing (the Usage plan). The maximum number of phone numbers is determined by the user's plan.