Zernio
Zernio
API Reference

Phone Numbers

Numbers

List phone numbersGETGet phone numberGETPurchase phone numberPOSTResolve a number claimGETRelease phone numberDELETE

Availability

List offerable number countriesGETCheck country availabilityGETSearch available numbersGET

Stock Watches

List stock watchesGETWatch an out-of-stock countryPOSTStop watching a countryDELETE

KYC

Get KYC form specGETSubmit KYCPOSTPre-validate KYC addressPOSTPre-review a KYC packetPOSTUpload a KYC documentPOSTView a KYC document on fileGETCreate a hosted KYC linkPOST

Remediation

Get declined requirementsGETResubmit a declined numberPOSTReply to the regulatory reviewerPOSTRespond to the regulatory reviewer (message + corrections)POST

Porting

Check portabilityPOSTCountry porting requirementsGETPort numbers inPOSTList port-in ordersGETResolve a port claimGETA port-in order's pending requirementsGETUpload a porting documentPOSTCancel a port-inDELETE

Other

Request the WhatsApp verification code for a numberPOST
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
Phone Numbers

Port numbers in

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.


POST
/v1/phone-numbers/port-in

Authorization

bearerAuth
AuthorizationBearer <token>

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

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

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.createPhoneNumberPortIn({  body: {    phoneNumbers: [      'string',    ],    endUser: {      entityName: 'Example',      authPersonName: 'Example',      accountNumber: 'string',      streetAddress: 'string',      locality: 'string',      postalCode: 'string',      countryCode: 'US',    },    loaDocumentId: 'loadocument_abc123',    invoiceDocumentId: 'invoicedocument_abc123',  },});console.log(data);
{  "id": "string",  "telnyxPortingOrderId": "string",  "status": "draft",  "phoneNumbers": [    "string"  ],  "orders": [    {      "id": "string",      "telnyxPortingOrderId": "string",      "status": "string",      "phoneNumbers": [        "string"      ],      "error": "string"    }  ]}
Was this page helpful?

Country porting requirements

The country-specific information a port-in needs BEYOND the LOA, invoice, and account/address details, such as an ID copy, proof of address, a tax id, or a porting code. Call it after the portability check (which returns each number's `countryCode` and `phoneNumberType`), render the fields, and pass the collected values as the create request's `requirements`. US/CA return an empty list.

List port-in orders

Your porting orders, newest first (max 50). Poll this for port progress: pending, confirmed FOC date, exception reason, or ported.

phoneNumbers*array<string>

E.164 numbers to port in.

Items1 <= items <= 50
endUser*

End-user / current-carrier account info that authorizes the port. The losing carrier matches every field against its records and rejects the whole port on a mismatch, so enter values exactly as they appear on the carrier bill.

loaDocumentId*string

Document id from POST /v1/phone-numbers/port-in/documents (kind=loa).

invoiceDocumentId*string

Document id from POST /v1/phone-numbers/port-in/documents (kind=invoice).

focDatetimeRequested?string

Requested port date; the carrier confirms the actual FOC later. US/CA default is one week out (shifted off weekends); international orders are scheduled into the carrier's next allowed porting window at or after this date.

Formatdate-time
customerReference?string
Lengthlength <= 100
portType?string

Whether the losing account ports all its numbers (full) or keeps some (partial).

Default"full"

Value in

  • "full"
  • "partial"
requirements?array<>

Country-specific requirement values for international ports (from GET /v1/phone-numbers/port-in/requirements). Not needed for US/CA. The LOA and invoice requirements are satisfied automatically by loaDocumentId/invoiceDocumentId, and address-type requirements by the endUser service address.

Itemsitems <= 30