Porting Order API

Porting Order operation

List all porting orders

Returns a list of your porting order.

SecuritybearerAuth
Request
query Parameters
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

include_phone_numbers
boolean
Default: true

Include the first 50 phone number objects in the results

filter[status]
string

Filter results by status

Enum: "draft" "in-process" "submitted" "exception" "foc-date-confirmed" "cancel-pending" "ported" "cancelled"
Example: filter[status]=in-process
filter[customer_reference]
string

Filter results by customer reference

Example: filter[customer_reference]=123abc
filter[phone_numbers][country_code]
string

Filter results by country ISO 3166-1 alpha-2 code

Example: filter[phone_numbers][country_code]=US
filter[phone_numbers][carrier_name]
string

Filter results by old service provider

Example: filter[phone_numbers][carrier_name]=Telnyx
filter[phone_numbers.phone_number][contains]
string

Filter results by full or partial phone_number

Example: filter[phone_numbers.phone_number][contains]=13038675309
filter[misc][type]
string (PortingOrderType)

Filter results by porting order type

Enum: "full" "partial"
Example: filter[misc][type]=full
filter[end_user][admin][entity_name]
string

Filter results by person or company name

Example: filter[end_user][admin][entity_name]=Porter McPortersen
filter[end_user][admin][auth_person_name]
string

Filter results by authorized person

Example: filter[end_user][admin][auth_person_name]=Admin McPortersen
filter[activation_settings][fast_port_eligible]
boolean

Filter results by fast port eligible

filter[activation_settings][foc_datetime_requested][gt]
string

Filter results by foc date later than this value

Example: filter[activation_settings][foc_datetime_requested][gt]=2021-03-25T10:00:00.000Z
filter[activation_settings][foc_datetime_requested][lt]
string

Filter results by foc date earlier than this value

Example: filter[activation_settings][foc_datetime_requested][lt]=2021-03-25T10:00:00.000Z
sort
string

Specifies the sort order for results. If not given, results are sorted by created_at in descending order.

Enum: "created_at" "-created_at" "activation_settings.foc_datetime_requested" "-activation_settings.foc_datetime_requested"
Example: sort=created_at
Responses
200

Successful response

Response Schema: application/json
Array of objects (PortingOrder)
object (PaginationMeta)
401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

get/porting_orders
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrder.list( page: { number: 1, size: 20})
Response samples
application/json
{
  • "data": [
    • {
      • "activation_settings": {
        • "activation_status": "Active",
        • "fast_port_eligible": true,
        • "foc_datetime_actual": "2021-03-19T10:07:15.527Z",
        • "foc_datetime_requested": "2021-03-19T10:07:15.527Z"
        },
      • "created_at": "2021-03-19T10:07:15.527Z",
      • "customer_reference": "Acct 123abc",
      • "description": "FP Telnyx",
      • "documents": {
        • "invoice": "ce74b771-d23d-4960-81ec-8741b3862146",
        • "loa": "64ffb720-04c7-455b-92d6-20fcca92e935"
        },
      • "end_user": {
        • "admin": {
          • "account_number": "123abc",
          • "auth_person_name": "Porter McPortersen II",
          • "billing_phone_number": 13035551234,
          • "business_identifier": "abc123",
          • "entity_name": "Porter McPortersen",
          • "pin_passcode": 1234,
          • "tax_identifier": "1234abcd"
          },
        • "location": {
          • "administrative_area": "IL",
          • "country_code": "US",
          • "extended_address": "Suite 504",
          • "locality": "Chicago",
          • "postal_code": "60654",
          • "street_address": "311 W. Superior St"
          }
        },
      • "id": "f1486bae-f067-460c-ad43-73a92848f902",
      • "misc": {
        • "new_billing_phone_number": "string",
        • "remaining_numbers_action": "disconnect",
        • "type": "full"
        },
      • "old_service_provider_ocn": "Unreal Communications",
      • "parent_support_key": "pr_123abc",
      • "phone_number_configuration": {
        • "connection_id": "f1486bae-f067-460c-ad43-73a92848f902",
        • "emergency_address_id": "f1486bae-f067-460c-ad43-73a92848f902",
        • "messaging_profile_id": "f1486bae-f067-460c-ad43-73a92848f901",
        • "tags": [
          • "abc",
          • "123"
          ]
        },
      • "phone_number_type": "local",
      • "porting_phone_numbers_count": 1,
      • "record_type": "porting_order",
      • "requirements": [
        • {
          • "field_type": "document",
          • "field_value": "9787fb5f-cbe5-4de4-b765-3303774ee9fe",
          • "record_type": "porting_requirement",
          • "requirement_type_id": "59b0762a-b274-4f76-ac32-4d5cf0272e66"
          }
        ],
      • "requirements_met": false,
      • "status": {
        • "details": [
          • {
            • "code": "ENTITY_NAME_MISMATCH",
            • "description": "Entity name does not match that on the CSR"
            }
          ],
        • "value": "ported"
        },
      • "support_key": "sr_123abc",
      • "updated_at": "2021-03-19T10:07:15.527Z",
      • "user_feedback": {
        • "user_comment": "I loved my experience porting numbers with Telnyx",
        • "user_rating": 5
        },
      • "user_id": "40d68ba2-0847-4df2-be9c-b0e0cb673e75",
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

Create a porting order

Creates a new porting order object.

SecuritybearerAuth
Request
Request Body schema: application/json
required
customer_reference
string

A customer-specified reference number for customer bookkeeping purposes

phone_numbers
required
Array of strings

The list of +E.164 formatted phone numbers

Responses
201

Successful response

Response Schema: application/json
Array of objects (PortingOrder)
Array
object (PortingOrderActivationSettings)
created_at
string <date-time>

ISO 8601 formatted date indicating when the resource was created.

customer_reference
string

A customer-specified reference number for customer bookkeeping purposes

description
string

A description of the porting order

object (PortingOrderDocuments)
object (PortingOrderEndUser)
id
string <uuid>

Uniquely identifies this porting order

object (PortingOrderMisc)
old_service_provider_ocn
string

Identifies the old service provider

parent_support_key
string

A key to reference for the porting order group when contacting Telnyx customer support. This information is not available for porting orders in draft state

object (PortingOrderPhoneNumberConfiguration)
phone_number_type
string

The type of the phone number

Enum: "landline" "local" "mobile" "national" "shared_cost" "toll_free"
porting_phone_numbers_count
integer

Count of phone numbers associated with this porting order

record_type
string

Identifies the type of the resource.

Array of objects (PortingOrderRequirement)

List of documentation requirements for porting numbers.

requirements_met
boolean

Is true when the required documentation is met

object (PortingOrderStatus)

Porting order status

support_key
string

A key to reference this porting order when contacting Telnyx customer support. This information is not available in draft porting orders.

updated_at
string <date-time>

ISO 8601 formatted date indicating when the resource was created.

object (PortingOrderUserFeedback)
user_id
string <uuid>

Identifies the user (or organization) who requested the porting order

webhook_url
string <uri>
401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

post/porting_orders
Request samples
application/json
{
  • "customer_reference": "Acct 123abc",
  • "phone_numbers": [
    • "+13035550000",
    • "+13035550001",
    • "+13035550002"
    ]
}
Response samples
application/json
{
  • "data": [
    • {
      • "activation_settings": {
        • "activation_status": null,
        • "fast_port_eligible": true,
        • "foc_datetime_actual": null,
        • "foc_datetime_requested": null
        },
      • "created_at": "2022-03-17T18:01:01Z",
      • "customer_reference": null,
      • "description": "FP Telnyx",
      • "documents": {
        • "invoice": null,
        • "loa": null
        },
      • "end_user": {
        • "admin": {
          • "account_number": null,
          • "auth_person_name": null,
          • "billing_phone_number": null,
          • "business_identifier": null,
          • "entity_name": null,
          • "pin_passcode": null,
          • "tax_identifier": null
          },
        • "location": {
          • "administrative_area": null,
          • "country_code": null,
          • "extended_address": null,
          • "locality": null,
          • "postal_code": null,
          • "street_address": null
          }
        },
      • "id": "b0ea6d6f-de31-4079-a536-992e0c98b037",
      • "misc": null,
      • "old_service_provider_ocn": "Unreal Communications",
      • "parent_support_key": null,
      • "phone_number_configuration": {
        • "connection_id": null,
        • "emergency_address_id": null,
        • "messaging_profile_id": null,
        • "tags": [ ]
        },
      • "phone_number_type": "local",
      • "phone_numbers": [
        • {
          • "activation_status": null,
          • "phone_number": "{e.164 TN}",
          • "phone_number_type": "local",
          • "portability_status": "confirmed",
          • "porting_order_id": "b0ea6d6f-de31-4079-a536-992e0c98b037",
          • "porting_order_status": "draft",
          • "record_type": "porting_phone_number",
          • "requirements_status": "requirement-info-pending",
          • "support_key": null
          }
        ],
      • "porting_phone_numbers_count": 1,
      • "record_type": "porting_order",
      • "requirements": [ ],
      • "requirements_met": false,
      • "status": {
        • "details": [ ],
        • "value": "draft"
        },
      • "support_key": null,
      • "updated_at": "2022-03-17T18:01:01Z",
      • "user_feedback": {
        • "user_comment": null,
        • "user_rating": null
        },
      • "user_id": "40d68ba2-0847-4df2-be9c-b0e0cb673e75",
      • "webhook_url": null
      }
    ]
}

List all exception types

Returns a list of all possible exception types for a porting order.

SecuritybearerAuth
Responses
200

Successful response

Response Schema: application/json
Array of objects (PortingOrdersExceptionType)
Array
code
string

Identifier of an exception type

Enum: "ACCOUNT_NUMBER_MISMATCH" "AUTH_PERSON_MISMATCH" "BTN_ATN_MISMATCH" "ENTITY_NAME_MISMATCH" "FOC_EXPIRED" "FOC_REJECTED" "LOCATION_MISMATCH" "LSR_PENDING" "MAIN_BTN_PORTING" "OSP_IRRESPONSIVE" "OTHER" "PASSCODE_PIN_INVALID" "PHONE_NUMBER_HAS_SPECIAL_FEATURE" "PHONE_NUMBER_MISMATCH" "PHONE_NUMBER_NOT_PORTABLE" "PORT_TYPE_INCORRECT" "PORTING_ORDER_SPLIT_REQUIRED" "PORTING_ORDER_SPLIT_REQUIRED" "POSTAL_CODE_MISMATCH" "RATE_CENTER_NOT_PORTABLE" "SV_CONFLICT" "SV_UNKNOWN_FAILURE"
description
string

Description of an exception type

401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

get/porting_orders/exception_types
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrders.list_exception_type.list()
Response samples
application/json
{
  • "data": [
    • {
      • "code": "ENTITY_NAME_MISMATCH",
      • "description": "Entity name does not match that on the CSR"
      }
    ]
}

Delete a porting order

Deletes an existing porting order. This operation is restrict to porting orders in draft state.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

Responses
204

No content

401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

delete/porting_orders/{id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

port_order = telnyx.PortingOrder.retrieve(PORTING_ORDER_ID)
port_order.delete()

Retrieve a porting order

Retrieves the details of an existing porting order.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

query Parameters
include_phone_numbers
boolean
Default: true

Include the first 50 phone number objects in the results

Responses
200

Successful response

Response Schema: application/json
object (PortingOrder)
object
401

Unauthorized

get/porting_orders/{id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrder.retrieve(PORTING_ORDER_ID)
Response samples
application/json
{
  • "data": {
    • "activation_settings": {
      • "activation_status": "Active",
      • "fast_port_eligible": true,
      • "foc_datetime_actual": "2021-03-19T10:07:15.527Z",
      • "foc_datetime_requested": "2021-03-19T10:07:15.527Z"
      },
    • "created_at": "2021-03-19T10:07:15.527Z",
    • "customer_reference": "Acct 123abc",
    • "description": "FP Telnyx",
    • "documents": {
      • "invoice": "ce74b771-d23d-4960-81ec-8741b3862146",
      • "loa": "64ffb720-04c7-455b-92d6-20fcca92e935"
      },
    • "end_user": {
      • "admin": {
        • "account_number": "123abc",
        • "auth_person_name": "Porter McPortersen II",
        • "billing_phone_number": 13035551234,
        • "business_identifier": "abc123",
        • "entity_name": "Porter McPortersen",
        • "pin_passcode": 1234,
        • "tax_identifier": "1234abcd"
        },
      • "location": {
        • "administrative_area": "IL",
        • "country_code": "US",
        • "extended_address": "Suite 504",
        • "locality": "Chicago",
        • "postal_code": "60654",
        • "street_address": "311 W. Superior St"
        }
      },
    • "id": "f1486bae-f067-460c-ad43-73a92848f902",
    • "misc": {
      • "new_billing_phone_number": "string",
      • "remaining_numbers_action": "disconnect",
      • "type": "full"
      },
    • "old_service_provider_ocn": "Unreal Communications",
    • "parent_support_key": "pr_123abc",
    • "phone_number_configuration": {
      • "connection_id": "f1486bae-f067-460c-ad43-73a92848f902",
      • "emergency_address_id": "f1486bae-f067-460c-ad43-73a92848f902",
      • "messaging_profile_id": "f1486bae-f067-460c-ad43-73a92848f901",
      • "tags": [
        • "abc",
        • "123"
        ]
      },
    • "phone_number_type": "local",
    • "porting_phone_numbers_count": 1,
    • "record_type": "porting_order",
    • "requirements": [
      • {
        • "field_type": "document",
        • "field_value": "9787fb5f-cbe5-4de4-b765-3303774ee9fe",
        • "record_type": "porting_requirement",
        • "requirement_type_id": "59b0762a-b274-4f76-ac32-4d5cf0272e66"
        }
      ],
    • "requirements_met": false,
    • "status": {
      • "details": [
        • {
          • "code": "ENTITY_NAME_MISMATCH",
          • "description": "Entity name does not match that on the CSR"
          }
        ],
      • "value": "ported"
      },
    • "support_key": "sr_123abc",
    • "updated_at": "2021-03-19T10:07:15.527Z",
    • "user_feedback": {
      • "user_comment": "I loved my experience porting numbers with Telnyx",
      • "user_rating": 5
      },
    • "user_id": "40d68ba2-0847-4df2-be9c-b0e0cb673e75",
    },
  • "meta": {
    • "phone_numbers_url": "/v2/porting_phone_numbers?filter[porting_order_id]=eef10fb8-f3df-4c67-97c5-e18179723222"
    }
}

Edit a porting order

Edits the details of an existing porting order.

Any or all of a porting order’s attributes may be included in the resource object included in a PATCH request.

If a request does not include all of the attributes for a resource, the system will interpret the missing attributes as if they were included with their current values. To explicitly set something to null, it must be included in the request with a null value.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

Request Body schema: application/json
required
object
customer_reference
string
object (PortingOrderDocuments)
object (PortingOrderEndUser)
object (PortingOrderMisc)
object (PortingOrderPhoneNumberConfiguration)
Array of objects (UpdatePortingOrderRequirement)

List of requirements for porting numbers.

object (PortingOrderUserFeedback)
webhook_url
string <uri>
Responses
200

Successful response

Response Schema: application/json
object (PortingOrder)
object
401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

patch/porting_orders/{id}
Request samples
application/json
{
  • "activation_settings": {
    • "foc_datetime_requested": "2021-03-19T10:07:15.527Z"
    },
  • "customer_reference": "string",
  • "documents": {
    • "invoice": "ce74b771-d23d-4960-81ec-8741b3862146",
    • "loa": "64ffb720-04c7-455b-92d6-20fcca92e935"
    },
  • "end_user": {
    • "admin": {
      • "account_number": "123abc",
      • "auth_person_name": "Porter McPortersen II",
      • "billing_phone_number": 13035551234,
      • "business_identifier": "abc123",
      • "entity_name": "Porter McPortersen",
      • "pin_passcode": 1234,
      • "tax_identifier": "1234abcd"
      },
    • "location": {
      • "administrative_area": "IL",
      • "country_code": "US",
      • "extended_address": "Suite 504",
      • "locality": "Chicago",
      • "postal_code": "60654",
      • "street_address": "311 W. Superior St"
      }
    },
  • "misc": {
    • "new_billing_phone_number": "string",
    • "remaining_numbers_action": "disconnect",
    • "type": "full"
    },
  • "phone_number_configuration": {
    • "connection_id": "f1486bae-f067-460c-ad43-73a92848f902",
    • "emergency_address_id": "f1486bae-f067-460c-ad43-73a92848f902",
    • "messaging_profile_id": "f1486bae-f067-460c-ad43-73a92848f901",
    • "tags": [
      • "abc",
      • "123"
      ]
    },
  • "requirements": [
    • {
      • "field_value": "9787fb5f-cbe5-4de4-b765-3303774ee9fe",
      • "requirement_type_id": "59b0762a-b274-4f76-ac32-4d5cf0272e66"
      }
    ],
  • "user_feedback": {
    • "user_comment": "I loved my experience porting numbers with Telnyx",
    • "user_rating": 5
    },
  • "webhook_url": "http://example.com"
}
Response samples
application/json
{
  • "data": {
    • "activation_settings": {
      • "activation_status": null,
      • "fast_port_eligible": true,
      • "foc_datetime_actual": null,
      • "foc_datetime_requested": "2022-04-08T15:00:00Z"
      },
    • "created_at": "2022-03-24T14:22:28Z",
    • "customer_reference": "Test1234",
    • "description": "FP Telnyx",
    • "documents": {
      • "invoice": null,
      • "loa": null
      },
    • "end_user": {
      • "admin": {
        • "account_number": "123abc",
        • "auth_person_name": "Porter McPortersen II",
        • "billing_phone_number": "+13035551234",
        • "business_identifier": "abc123",
        • "entity_name": "Porter McPortersen",
        • "pin_passcode": "1234",
        • "tax_identifier": "1234abcd"
        },
      • "location": {
        • "administrative_area": "IL",
        • "country_code": "US",
        • "extended_address": "Suite 504",
        • "locality": "Chicago",
        • "postal_code": "60654",
        • "street_address": "311 W. Superior St"
        }
      },
    • "id": "eef10fb8-f3df-4c67-97c5-e18179723222",
    • "misc": {
      • "new_billing_phone_number": null,
      • "remaining_numbers_action": null,
      • "type": "full"
      },
    • "old_service_provider_ocn": "Unreal Communications",
    • "parent_support_key": null,
    • "phone_number_configuration": {
      • "connection_id": "1752379429071357070",
      • "emergency_address_id": null,
      • "messaging_profile_id": null,
      • "tags": [ ]
      },
    • "phone_number_type": "local",
    • "porting_phone_numbers_count": 1,
    • "record_type": "porting_order",
    • "requirements": [ ],
    • "requirements_met": false,
    • "status": {
      • "details": [ ],
      • "value": "draft"
      },
    • "support_key": null,
    • "updated_at": "2022-03-24T14:26:53Z",
    • "user_feedback": {
      • "user_comment": null,
      • "user_rating": null
      },
    • "user_id": "40d68ba2-0847-4df2-be9c-b0e0cb673e75",
    },
  • "meta": {
    • "phone_numbers_url": "/v2/porting_phone_numbers?filter[porting_order_id]=eef10fb8-f3df-4c67-97c5-e18179723222"
    }
}

Activates every number on a porting order.

Activate every numbers of a porting order asynchronously.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

Responses
202

Successful response

Response Schema: application/json
object (PortingOrdersActivationJob)
created_at
string <date-time>

ISO 8601 formatted date indicating when the resource was created.

id
string <uuid>

Uniquely identifies this activation job

record_type
string

Identifies the type of the resource.

status
string

Specifies the status of this activation job

Enum: "created" "in-process" "completed" "failed"
updated_at
string <date-time>

ISO 8601 formatted date indicating when the resource was created.

401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

post/porting_orders/{id}/actions/activate
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrders.post_actions.post_activate.create()
Response samples
application/json
{
  • "data": {
    • "created_at": "2021-03-19T10:07:15.527Z",
    • "id": "f1486bae-f067-460c-ad43-73a92848f902",
    • "record_type": "porting_activation_job",
    • "status": "created",
    • "updated_at": "2021-03-19T10:07:15.527Z"
    }
}

Cancel a porting order

Cancel a porting order

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

Responses
200

Successful response

Response Schema: application/json
object (PortingOrder)
object
401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

post/porting_orders/{id}/actions/cancel
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrders.post_actions.post_cancel.create()
Response samples
application/json
{
  • "data": {
    • "activation_settings": {
      • "activation_status": null,
      • "fast_port_eligible": true,
      • "foc_datetime_actual": null,
      • "foc_datetime_requested": "2022-04-08T15:00:00Z"
      },
    • "created_at": "2022-03-24T14:22:28Z",
    • "customer_reference": "Test1234",
    • "description": "FP Telnyx",
    • "documents": {
      • "invoice": "3a5b98a0-5049-47c3-96e1-aa6c8d119117",
      • "loa": "3a5b98a0-5049-47c3-96e1-aa6c8d119117"
      },
    • "end_user": {
      • "admin": {
        • "account_number": "123abc",
        • "auth_person_name": "Porter McPortersen II",
        • "billing_phone_number": "+13035551234",
        • "business_identifier": "abc123",
        • "entity_name": "Porter McPortersen",
        • "pin_passcode": "1234",
        • "tax_identifier": "1234abcd"
        },
      • "location": {
        • "administrative_area": "IL",
        • "country_code": "US",
        • "extended_address": "Suite 504",
        • "locality": "Chicago",
        • "postal_code": "60654",
        • "street_address": "311 W. Superior St"
        }
      },
    • "id": "eef10fb8-f3df-4c67-97c5-e18179723222",
    • "misc": {
      • "new_billing_phone_number": null,
      • "remaining_numbers_action": null,
      • "type": "full"
      },
    • "old_service_provider_ocn": "Unreal Communications",
    • "parent_support_key": "pr_4bec1a",
    • "phone_number_configuration": {
      • "connection_id": "1752379429071357070",
      • "emergency_address_id": null,
      • "messaging_profile_id": null,
      • "tags": [ ]
      },
    • "phone_number_type": "local",
    • "porting_phone_numbers_count": 1,
    • "record_type": "porting_order",
    • "requirements": [ ],
    • "requirements_met": true,
    • "status": {
      • "details": [ ],
      • "value": "cancel-pending"
      },
    • "support_key": "sr_10b316",
    • "updated_at": "2022-03-24T16:43:35Z",
    • "user_feedback": {
      • "user_comment": null,
      • "user_rating": null
      },
    • "user_id": "40d68ba2-0847-4df2-be9c-b0e0cb673e75",
    },
  • "meta": {
    • "phone_numbers_url": "/v2/porting_phone_numbers?filter[porting_order_id]=eef10fb8-f3df-4c67-97c5-e18179723222"
    }
}

Submit a porting order.

Confirm and submit your porting order.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

Responses
200

Successful response

Response Schema: application/json
object (PortingOrder)
object
401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

post/porting_orders/{id}/actions/confirm
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrders.post_actions.post_confirm.create()
Response samples
application/json
{
  • "data": {
    • "activation_settings": {
      • "activation_status": null,
      • "fast_port_eligible": true,
      • "foc_datetime_actual": null,
      • "foc_datetime_requested": "2022-04-08T15:00:00Z"
      },
    • "created_at": "2022-03-24T14:22:28Z",
    • "customer_reference": "Test1234",
    • "description": "FP Telnyx",
    • "documents": {
      • "invoice": "3a5b98a0-5049-47c3-96e1-aa6c8d119117",
      • "loa": "3a5b98a0-5049-47c3-96e1-aa6c8d119117"
      },
    • "end_user": {
      • "admin": {
        • "account_number": "123abc",
        • "auth_person_name": "Porter McPortersen II",
        • "billing_phone_number": "+13035551234",
        • "business_identifier": "abc123",
        • "entity_name": "Porter McPortersen",
        • "pin_passcode": "1234",
        • "tax_identifier": "1234abcd"
        },
      • "location": {
        • "administrative_area": "IL",
        • "country_code": "US",
        • "extended_address": "Suite 504",
        • "locality": "Chicago",
        • "postal_code": "60654",
        • "street_address": "311 W. Superior St"
        }
      },
    • "id": "eef10fb8-f3df-4c67-97c5-e18179723222",
    • "misc": {
      • "new_billing_phone_number": null,
      • "remaining_numbers_action": null,
      • "type": "full"
      },
    • "old_service_provider_ocn": "Unreal Communications",
    • "parent_support_key": "pr_4bec1a",
    • "phone_number_configuration": {
      • "connection_id": "1752379429071357070",
      • "emergency_address_id": null,
      • "messaging_profile_id": null,
      • "tags": [ ]
      },
    • "phone_number_type": "local",
    • "porting_phone_numbers_count": 1,
    • "record_type": "porting_order",
    • "requirements": [ ],
    • "requirements_met": true,
    • "status": {
      • "details": [ ],
      • "value": "in-process"
      },
    • "support_key": "sr_10b316",
    • "updated_at": "2022-03-24T16:42:43Z",
    • "user_feedback": {
      • "user_comment": null,
      • "user_rating": null
      },
    • "user_id": "40d68ba2-0847-4df2-be9c-b0e0cb673e75",
    },
  • "meta": {
    • "phone_numbers_url": "/v2/porting_phone_numbers?filter[porting_order_id]=eef10fb8-f3df-4c67-97c5-e18179723222"
    }
}

List all porting activation jobs

Returns a list of your porting activation jobs.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

query Parameters
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

Responses
200

Successful response

Response Schema: application/json
Array of objects (PortingOrdersActivationJob)
object (PaginationMeta)
401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

get/porting_orders/{id}/activation_jobs
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrders.retrieve_activation_job.retrieve("id",page={"number":1,"size":20})
Response samples
application/json
{
  • "data": [
    • {
      • "created_at": "2021-03-19T10:07:15.527Z",
      • "id": "f1486bae-f067-460c-ad43-73a92848f902",
      • "record_type": "porting_activation_job",
      • "status": "created",
      • "updated_at": "2021-03-19T10:07:15.527Z"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

Retrieve a porting activation job

Returns a porting activation job.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

activationJobId
required
string <uuid>

Activation Job Identifier

Responses
200

Successful response

Response Schema: application/json
object (PortingOrdersActivationJob)
created_at
string <date-time>

ISO 8601 formatted date indicating when the resource was created.

id
string <uuid>

Uniquely identifies this activation job

record_type
string

Identifies the type of the resource.

status
string

Specifies the status of this activation job

Enum: "created" "in-process" "completed" "failed"
updated_at
string <date-time>

ISO 8601 formatted date indicating when the resource was created.

401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

get/porting_orders/{id}/activation_jobs/{activationJobId}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrder.retrieve("id}/activation_jobs/{activationJobId")
Response samples
application/json
{
  • "data": {
    • "created_at": "2021-03-19T10:07:15.527Z",
    • "id": "f1486bae-f067-460c-ad43-73a92848f902",
    • "record_type": "porting_activation_job",
    • "status": "created",
    • "updated_at": "2021-03-19T10:07:15.527Z"
    }
}

List allowed FOC dates

Returns a list of allowed FOC dates for a porting order.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

Responses
200

Successful response

Response Schema: application/json
Array of objects (PortingOrdersAllowedFocWindow)
object (PaginationMeta)
401

Unauthorized

get/porting_orders/{id}/allowed_foc_windows
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrders.retrieve_allowed_foc_window.retrieve("id")
Response samples
application/json
{
  • "data": [
    • {
      • "ended_at": "2021-03-19T10:07:15.527Z",
      • "record_type": "porting_order",
      • "started_at": "2021-03-19T10:07:15.527Z"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

List all comments of a porting order

Returns a list of all comments of a porting order.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

query Parameters
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

Responses
200

Successful response

Response Schema: application/json
Array of objects (PortingOrdersComment)
object (PaginationMeta)
401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

get/porting_orders/{id}/comments
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrders.retrieve_comment.retrieve("id",page={"number":1,"size":20})
Response samples
application/json
{
  • "data": [
    • {
      • "body": "Great experience so far",
      • "created_at": "2021-03-19T10:07:15.527Z",
      • "id": "f1486bae-f067-460c-ad43-73a92848f902",
      • "porting_order_id": "f1486bae-f067-460c-ad43-73a92848f902",
      • "record_type": "porting_comment",
      • "user_type": "user"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

Create a comment for a porting order

Creates a new comment for a porting order.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

Request Body schema: application/json
required
body
string
Responses
201

Successful response

Response Schema: application/json
object (PortingOrdersComment)
body
string

Body of comment

created_at
string <date-time>

ISO 8601 formatted date indicating when the resource was created.

id
string <uuid>
porting_order_id
string <uuid>
record_type
string

Identifies the type of the resource.

user_type
string

Indicates whether this comment was created by a Telnyx Admin, user, or system

Enum: "admin" "user" "system"
401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

post/porting_orders/{id}/comments
Request samples
application/json
{
  • "body": "Please, let me know when the port completes"
}
Response samples
application/json
{
  • "data": {
    • "body": "Great experience so far",
    • "created_at": "2021-03-19T10:07:15.527Z",
    • "id": "f1486bae-f067-460c-ad43-73a92848f902",
    • "porting_order_id": "f1486bae-f067-460c-ad43-73a92848f902",
    • "record_type": "porting_comment",
    • "user_type": "user"
    }
}

Download a porting order loa template

Download a porting order loa template

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

Responses
200

Successful response

Response Schema: application/pdf
string <binary>
401

Unauthorized

get/porting_orders/{id}/loa_template
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

port_order = telnyx.PortingOrder.retrieve(PORTING_ORDER_ID)
port_order.loaTemplate()

List porting order requirements

Returns a list of all requirements based on country/number type for this porting order.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

query Parameters
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

Responses
200

Successful response

Response Schema: application/json
Array of objects (PortingOrderRequirementDetail)
object (PaginationMeta)
401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

get/porting_orders/{id}/requirements
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrders.retrieve_requirement.retrieve("id",page={"number":1,"size":20})
Response samples
application/json
{
  • "data": [
    • {
      • "field_type": "document",
      • "field_value": "9787fb5f-cbe5-4de4-b765-3303774ee9fe",
      • "record_type": "porting_requirement",
      • "requirement_status": "approved",
      • "requirement_type": {
        • "acceptance_criteria": {
          • "acceptable_values": [ ]
          },
        • "description": "A copy of the latest phone bill from the current provider",
        • "example": "Most recent phone bill",
        • "id": "53970723-fbff-4f46-a975-f62be6c1a585",
        • "name": "Latest Invoice",
        • "type": "document"
        }
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

Retrieve the associated V1 sub_request_id and port_request_id

Retrieve the associated V1 sub_request_id and port_request_id

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Porting Order id

Responses
200

Successful response

Response Schema: application/json
object (GetSubRequestByPortingOrder)
port_request_id
string

Identifies the Port Request associated with the Porting Order

sub_request_id
string

Identifies the Sub Request associated with the Porting Order

401

Unauthorized

404

Porting Order not found

get/porting_orders/{id}/sub_request
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingOrders.retrieve_sub_request.retrieve("id")
Response samples
application/json
{
  • "data": {
    • "port_request_id": "59b0762a-b274-4f76-ac32-4d5cf0272e66",
    • "sub_request_id": "9787fb5f-cbe5-4de4-b765-3303774ee9fe"
    }
}

List all porting phone numbers

Returns a list of your porting phone numbers.

SecuritybearerAuth
Request
query Parameters
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

filter[porting_order_id]
string <uuid>

Filter results by porting order id

Example: filter[porting_order_id]=f3575e15-32ce-400e-a4c0-dd78800c20b0
filter[porting_order_id][in][]
Array of strings <uuid>

Filter results by a list of porting order ids

Example: filter[porting_order_id][in][]=f3575e15-32ce-400e-a4c0-dd78800c20b0
filter[support_key][eq]
string

Filter results by support key

Example: filter[support_key][eq]=sr_a12345
filter[support_key][in][]
Array of strings

Filter results by a list of support keys

Example: filter[support_key][in][]=sr_a12345
filter[phone_number]
string

Filter results by phone number

Example: filter[phone_number]=+12003151212
filter[phone_number][in][]
Array of strings

Filter results by a list of phone numbers

Example: filter[phone_number][in][]=+12003151212
filter[porting_order_status]
string

Filter results by porting order status

Enum: "draft" "in-process" "submitted" "exception" "foc-date-confirmed" "cancel-pending" "ported" "cancelled"
Example: filter[porting_order_status]=in-process
filter[activation_status]
string (PortingOrderActivationStatus)

Filter results by activation status

Enum: "New" "Pending" "Conflict" "Cancel Pending" "Failed" "Concurred" "Activate RDY" "Disconnect Pending" "Concurrence Sent" "Old" "Sending" "Active" "Canceled"
Example: filter[activation_status]=Active
filter[portability_status]
string (PortabilityStatus)

Filter results by portability status

Enum: "pending" "confirmed" "provisional"
Example: filter[portability_status]=confirmed
Responses
200

Successful response

Response Schema:
Array of objects (PortingPhoneNumber)
object (PaginationMeta)
401

Unauthorized

422

Unprocessable entity. Check message field in response for details.

get/porting_phone_numbers
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.PortingPhoneNumber.list(page={"number":1,"size":20})
Response samples
{
  • "data": [
    • {
      • "activation_status": "Active",
      • "phone_number": 13035550987,
      • "phone_number_type": "local",
      • "portability_status": "confirmed",
      • "porting_order_id": "f1486bae-f067-460c-ad43-73a92848f902",
      • "porting_order_status": "in-process",
      • "record_type": "porting_phone_number",
      • "requirements_status": "approved",
      • "support_key": "sr_a12345"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}