This is the API V2 documentation. To switch out of beta revert back to our API V1.

Open SidemenuAPI Reference
API Reference
Close Sidemenu

Number Portout

Retrieve a list of portout requestslistPortoutRequest

get https://api.telnyx.com/v2/portouts

Returns the portout requests according to filters

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/portouts?filter[carrier_name]=undefined&filter[spid]=undefined"
Parameters
In query
filter[carrier_name]
string
optional

Filter by new carrier name.

filter[spid]
string
optional

Filter by new carrier spid.

filter[status]
string
optional

Filter by portout status.

Options: [ "pending", "approved", "rejected", "ported" ]
page[number]
integer (1)
optional

The page number to load

Default: 1
page[size]
integer (1 - 250)
optional

The size of the page

Default: 20
Responses
200

Portout Response

401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

Success Response
{
  "data": [
    {
      "carrier_name": "test",
      "created_at": "2018-02-02T22:25:27.521Z",
      "foc_date": "2018-02-02T22:25:27.521Z",
      "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      "phone_numbers": [
        "+35312345678"
      ],
      "record_type": "portout",
      "requested_foc_date": "2018-02-02T22:25:27.521Z",
      "spid": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      "status": "pending",
      "updated_at": "2018-02-02T22:25:27.521Z"
    }
  ],
  "meta": {
    "page_number": 3,
    "page_size": 1,
    "total_pages": 13,
    "total_results": 13
  }
}

Retrieve a portout requestfindPortoutRequest

get https://api.telnyx.com/v2/portouts/{id}

Returns the portout request based on the ID provided

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/portouts/{id}"
Parameters
In path
id
string (uuid)
required

Portout id

Responses
200

Portout Response

401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

Success Response
{
  "data": {
    "carrier_name": "test",
    "created_at": "2018-02-02T22:25:27.521Z",
    "foc_date": "2018-02-02T22:25:27.521Z",
    "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    "phone_numbers": [
      "+35312345678"
    ],
    "record_type": "portout",
    "requested_foc_date": "2018-02-02T22:25:27.521Z",
    "spid": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    "status": "pending",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

Update StatusupdatePortoutRequest

patch https://api.telnyx.com/v2/portouts/{id}/{status}

Authorize or reject portout request

curl -X PATCH \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{}' \
  https://api.telnyx.com/v2/portouts/{id}
Parameters
In path
id
string (uuid)
required

Portout id

status
string
required

Updated portout status

Options: [ "authorized", "rejected" ]
Responses
200

Portout Response

401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

Success Response
{
  "data": {
    "carrier_name": "test",
    "created_at": "2018-02-02T22:25:27.521Z",
    "foc_date": "2018-02-02T22:25:27.521Z",
    "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    "phone_numbers": [
      "+35312345678"
    ],
    "record_type": "portout",
    "requested_foc_date": "2018-02-02T22:25:27.521Z",
    "spid": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    "status": "pending",
    "updated_at": "2018-02-02T22:25:27.521Z"
  }
}

List all comments for a portout requestfindPortoutComments

get https://api.telnyx.com/v2/portouts/{id}/comments

Returns a list of comments for a portout request.

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/portouts/{id}/comments"
Parameters
In path
id
string (uuid)
required

Portout id

Responses
200

Portout Comments

401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

Success Response
{
  "data": [
    {
      "body": "This is a comment",
      "created_at": "2018-02-02T22:25:27.521Z",
      "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      "portout_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
      "record_type": "portout",
      "user_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
    }
  ],
  "meta": {
    "page_number": 3,
    "page_size": 1,
    "total_pages": 13,
    "total_results": 13
  }
}

Create a comment on a portout requestpostPortRequestComment

post https://api.telnyx.com/v2/portouts/{id}/comments

Creates a comment on a portout request.

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"body": "Comment to post on this portout request"}' \
  https://api.telnyx.com/v2/portouts/{id}/comments
Parameters
In path
id
string (uuid)
required

Portout id

In body
body
string
optional

Comment to post on this portout request

Responses
201

Portout Comment Response

401

Unauthorized

404

Resource not found

422

Unprocessable entity. Check message field in response for details.

Success Response
{
  "data": {
    "body": "This is a comment",
    "created_at": "2018-02-02T22:25:27.521Z",
    "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    "portout_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    "record_type": "portout",
    "user_id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0"
  }
}

Was this section helpful?was-this-page-helpful