Skip to main content
PATCH
/
portouts
/
{id}
/
{status}
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const response = await client.portouts.updateStatus('authorized', {
  id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
  reason: 'I do not recognize this transaction',
});

console.log(response.data);
{
  "data": {
    "id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    "record_type": "portout",
    "phone_numbers": [
      "+35312345678"
    ],
    "authorized_name": "McPortersen",
    "carrier_name": "test",
    "current_carrier": "telnyx",
    "end_user_name": "McPortersen",
    "city": "Chicago",
    "state": "IL",
    "zip": "00000",
    "lsr": [
      "https://example.com/files/lsr.pdf"
    ],
    "pon": "00000000",
    "reason": null,
    "rejection_code": 1002,
    "service_address": "000 Example Street",
    "foc_date": "2018-02-02T22:25:27.521Z",
    "requested_foc_date": "2018-02-02T22:25:27.521Z",
    "spid": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
    "support_key": "PO_764725",
    "status": "rejected",
    "already_ported": false,
    "user_id": "7865816a-ee85-4e50-b19e-52983dcc6d4a",
    "vendor": "0e66ed3b-37e6-4fed-93d6-a30ce2493661",
    "created_at": "2018-02-02T22:25:27.521Z",
    "inserted_at": "2018-02-02T22:25:27.521Z",
    "updated_at": "2018-02-02T22:25:27.521Z",
    "host_messaging": false
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string<uuid>
required

Portout id

status
enum<string>
required

Updated portout status

Available options:
authorized,
rejected-pending

Body

application/json
reason
string
required

Provide a reason if rejecting the port out request

Example:

"I do not recognize this transaction"

host_messaging
boolean
default:false

Indicates whether messaging services should be maintained with Telnyx after the port out completes

Example:

false

Response

Portout Response

data
object