Skip to content

Porting API (1.0)

Automated processing of port-in phone number operations

Download OpenAPI description
Overview
License

MIT

Languages
Servers
v1.0 of the porting API

https://porting.api.sinch.com/v1/projects/{projectId}/

Port-in numbers

You can create orders, check portability, and more. When you port in phone numbers to Sinch you need to make sure the numbers are portable, you can use the portability check to make sure the numbers are portable before creating an order. If a number is not portable the whole order will fail. When porting a number to Sinch you can either use the dashboard or the API, the API is recommended for larger orders and for automation.

Note: For port orders of over 500 numbers, please contact the support team.

The recommended way to port numbers to Sinch is to schedule the port, this means that you create an order and specify a desired port date and time, If you have more advanced needs like on-demand activation, you can read more about that in the advanced porting section.

Operations
Webhooks

Port-in settings

Porting default settings

Operations

Advanced porting

This section is for advanced porting operations, like on demand activating numbers, getting available numbers for activation, and more. If you are looking for basic porting operations like creating an order, checking portability, and more, please refer to the Port-in numbers section.

Operations

Error Messages

Request errors are returned as HTTP status codes. The following table lists the possible error codes and their meaning.

The type will give you a general idea of why the operation failed, whereas the errorCode describes the issue in more detail. Below we list the error_codes for the API, segmented by their corresponding error_type.

Http Error Codes

400 - Bad Request

{
  "code": "404",
  "error": "Bad Request",
  "message": "
    The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
    It could be invalid JSON, missing required fields, or other issues."
}

401 - Unauthorized

Empty body, or you have the wrong API key, secret, or project.

402 - Payment required

{
  "code": "402",
  "error": "Payment required",
  "message": "You have reached 0 balance on your account please make a payment."
}

404 - Not found

{
  "code": "404",
  "error": "Not found",
  "message": "The resource is not found, not available, or does not exist."
}

422 - Unprocessable Content (Invalid parameters)

{
  "code": "422",
  "error": "Invalid parameters",
  "message": "The request could not be understood by the server due to malformed syntax.
     The client SHOULD NOT repeat the request without modifications."
  details: {
    fieldViolations: [
      {
        field: "to",
        description: "The (+15551) is not a valid phone number"
      }
    ]

  }

429 Rate limit exceeded

Rate limit exceeded, please back off and try again later. If you need higher rate please contact support.

500 - Internal Server Error

Probably no body, but if there is a body it will look like this:

{
  "code": "500",
  "error": "Internal service error",
  "message": "Most likely a temporary issue, please try again later. If the problem persists, please back of on this request and contact support."
}

Error object

Please note that the response code is probably the most important part of the response, but the error object will contain more information about the error. Not all errors return this object, and the details object is not always present.