Port-Ins
Bandwidth lets you port US/Canada local, US/Canada toll free, and international phone numbers through a single set of APIs. They build on the existing /portins and /bulkPortins APIs. The URLs are the same, but v2 orders:
- Use JSON on the
/api/v2base path - Accept a mix of countries and number types in one bulk port-in
- Run the Portability Checker on every number automatically and group portable numbers into child port-ins for you
- Accept a saved address (
addressId) or an inlineserviceAddress. See Creating an Address
Eligibility
Your account must be on the Universal Platform. If it is not, use the Legacy guides instead: Bulk Port-Ins and Stand-Alone Port-Ins.
All requests must be sent to the v2 base path:
https://api.bandwidth.com/api/v2/accounts/{accountId}/...
Orders created through /api/v1 follow the behavior described in the Legacy guides.
Choosing Bulk or Stand-Alone
| Use | When |
|---|---|
| Bulk Port-Ins | You have many numbers, possibly across countries, carriers, or number types. Bandwidth splits them into child port-ins, and you submit them all together. |
| Stand-Alone Port-Ins | Your numbers form a single portable group: the same country, number type, port type, and losing carrier (US/Canada local) or controlling RespOrg (toll free). |
End-to-End Flow
- Check portability. Call POST /accounts/{accountId}/porting/portability/phoneNumbers to learn which numbers are portable, how they group, which documents are required, and the earliest estimated port date. See the Portability Checker.
- Prepare prerequisites. Create a Voice Configuration Package, plus any addresses and Requirements Packages the numbers need (see below).
- Create the order. Create a bulk port-in and attach the numbers, or create a stand-alone port-in for a single group.
- Complete each port-in. Fill in subscriber details, the losing carrier (international), and upload the required documents. Use Available FOC Dates to pick a
requestedFocDatethe port-in will accept and to see which weekend and holiday dates are skipped. - Submit. Submit the bulk port-in (which submits every child) or the stand-alone port-in.
- Monitor. Poll the order or subscribe to order notifications until it completes.
Prerequisites
| Item | Required when | Notes |
|---|---|---|
| Sub-account (site) | Required to submit (optional on a draft) | Passed as subAccountId. locationId is optional. |
| Voice Configuration Package | Required to submit when your account uses Voice Configuration Packages (optional on a draft) | Passed as voiceConfigurationPackageId. A missing value on submit returns error 7697. |
| Address | Always for the subscriber of a US/Canada local or international port-in | Use either an addressId from the address service or an inline serviceAddress. Addresses on a bulk port-in must be in the USA or Canada; international child port-ins take their own addressId. See Creating an Address. |
| Requirements Package | The country and number type require end-user verification (see complianceRequirements in the portability response) | Must be verified before the port-in can proceed. Passed as requirementsPackageId. See Creating a Requirements Package. |
| Porting documents (LOA, COB, ...) | Listed in portingDocuments of the portability response | US/Canada local and toll free use the /loas endpoint; international port-ins use the /porting/portinOrders/{orderId}/documents endpoint. See Uploading Documents. |
| Target RespOrg | Porting toll free numbers | Passed as targetRespOrgId, a 5-character Bandwidth RespOrg ID such as JYT01. |
Uploading Documents
Documents are uploaded to individual port-ins, never to a bulk port-in. Uploading to a bulk port-in returns error 7752: "Documents for bulk port-in orders on the universal platform should be uploaded to the individual child port-ins orders."
| Port-in type | Endpoint |
|---|---|
| US/Canada local | POST /accounts/{accountId}/portins/{orderId}/loas |
| US/Canada toll free | POST /accounts/{accountId}/portins/{orderId}/loas |
| International (non-NANP) | POST /accounts/{accountId}/porting/portinOrders/{orderId}/documents (see Managing Documents) |
Port Type Terms
Port type terms used in these guides: automated ports are exchanged electronically with the losing carrier, and manual ports are handled by Bandwidth porting agents. Off-net numbers move from another carrier, while on-net and internal numbers are already on Bandwidth. E-bonded wireless carriers have an automated wireless interface.
See Porting Terminology for these and other porting terms.
Limits
| Limit | Value |
|---|---|
| Numbers per portability check | 5,000 |
| Numbers per bulk port-in TN list | 20,000 |
| Numbers per international port-in | 500. A bulk port-in splits larger groups into several child port-ins. A stand-alone port-in is rejected with error 7660. |
| Draft retention | Draft orders are removed 48 hours after their last update |
| Requested FOC time, US/Canada | 11:30 AM Eastern, or a range for triggered and wireless ports. See Available FOC Dates |
| Requested FOC time, international | Midnight in the country's port time zone (UTC by default). See Available FOC Dates |
Statuses
Bulk port-in processingStatus
| Status | Meaning |
|---|---|
DRAFT | Created, with no child port-ins yet. |
VALIDATE_DRAFT_TNS | Numbers are being checked for portability and grouped into child port-ins. |
VALID_DRAFT_TNS | Every number is portable and child port-ins have been created. |
INVALID_DRAFT_TNS | At least one number is not portable, or a toll free child port-in is INVALID_DRAFT_TFNS. Portable numbers still get child port-ins; see errors in the TN list. |
IN_PROGRESS | Submitted. Child port-ins are being processed. |
NEEDS_ATTENTION | At least one child port-in is in EXCEPTION, INVALID_TFNS, or MISSING_REQUIREMENTS. |
COMPLETED | Every child port-in is COMPLETE. Terminal. |
PARTIAL | Child port-ins finished in a mix of COMPLETE and CANCELLED. Terminal. |
CANCELLED | Every child port-in is CANCELLED. Terminal. |
Port-in processingStatus
| Status | Meaning |
|---|---|
DRAFT | Saved but not submitted. |
VALIDATE_DRAFT_TFNS / VALID_DRAFT_TFNS / INVALID_DRAFT_TFNS | Draft toll free port-in whose numbers are being validated, are valid, or are invalid. |
VALIDATE_TFNS / INVALID_TFNS | Submitted toll free port-in whose numbers are being validated, or failed validation. |
PENDING_DOCUMENTS | Submitted US/Canada port-in waiting for its LOA. |
MISSING_REQUIREMENTS | Submitted international port-in waiting on documents or a Requirements Package. See missingRequirements on the order. |
SUBMITTED | Sent to the losing carrier or porting vendor. |
PENDING_CARRIER_APPROVAL | International port-ins only. Waiting for the losing carrier to approve. |
FOC | The losing carrier confirmed the port date. |
REQUESTED_SUPP | An update (supp) to a submitted order is being processed. |
EXCEPTION | The order needs a correction. See errors on the order. |
REQUESTED_CANCEL | A cancellation is being processed. |
COMPLETE | The numbers are ported to Bandwidth. Terminal. |
CANCELLED | The order was cancelled. Terminal. |
Notifications
Instead of polling, create a subscription with Subscriptions v2 (API reference):
- Order type
bulkPortinsfor bulk port-in status changes - Order type
portinsfor port-in (including child port-in) status changes