Watch an out-of-stock country
Get notified the first time an out-of-stock country has deliverable
numbers again: an email to the account holder plus the
phone_number.stock_available webhook. Stock is re-checked every 6h.
One watch per country; a repeat request returns the existing watch
(200). The watch is consumed when it fires, so re-create it if you
miss the stock. Up to 20 countries can be watched at once.
API key authentication - use your Zernio API key as a Bearer token
In: header
ISO 3166-1 alpha-2 code of a country listed by GET /v1/phone-numbers/countries.
2 <= length <= 2Response Body
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.phonenumbers.createPhoneNumberStockWatch({ body: { country: 'string', },});console.log(data);{
"id": "string",
"country": "string",
"countryName": "string",
"createdAt": "2019-08-24T14:15:22Z"
}{
"id": "string",
"country": "string",
"countryName": "string",
"createdAt": "2019-08-24T14:15:22Z"
}{
"error": "string",
"type": "invalid_request_error",
"code": "string",
"param": "string",
"platform": "string",
"platformError": {},
"details": {}
}{
"error": "Unauthorized"
}Port numbers in POST
Submit a port-in for one or more existing numbers from another carrier. Creates the carrier order(s), attaches the end-user (current account) info plus the LOA and invoice documents, and submits to the losing carrier. The transfer PIN is forwarded to the carrier and never stored. Ported numbers arrive voice-ready (and SMS-ready where the order supports messaging). Run the portability check (POST /v1/phone-numbers/port-in/check) and upload the two documents (POST /v1/phone-numbers/port-in/documents) first — uploaded documents must be attached to an order within 30 minutes or the carrier deletes them, so upload right before this call. The carrier may split the numbers into several orders (by country, number type, losing carrier); `orders` carries per-order results, and a partial failure still returns 201 with the failed orders' `error` set (they stay as cancellable drafts). Non-US/CA numbers additionally need the country-specific values from GET /v1/phone-numbers/port-in/requirements, passed via `requirements`, and must be submitted one country per request. When required information is still missing after submission, the order is kept as a resumable draft whose `error` / `declineReason` names the gaps.
Get KYC form spec GET
For a Tier 3/4 country, the fields the end customer must provide (Telnyx regulatory requirements) before a number can be ordered: text, date, address, or file (document) per requirement.