Skip to main content

List all numbers

GET 
/origination/numbers

Returns a list of your numbers. Append .csv to the request URL to retrieve results in CSV format.

Request

Query Parameters

    filter_tag string

    Optional filtering parameter. If present, only numbers that have been tagged  with the string given will be returned. Returns exact matches only.

    filter_number_val string

    Optional filtering parameter. If present, only numbers that at least partially match the value given in their number will be returned. Requires at least three digits. Non-numerical characters should not be present in the filter and will result in no values being returned.

    filter_status integer

    Possible values: [1, 2, 3, 4, 5]

    Optional filtering parameter. If present, only numbers that have the same status as specified will be returned.

    filter_emergency_status string

    Possible values: [disabled, active, provisioning, deprovisioning]

    Optional filtering parameter. If present, only numbers that have the same emergency_status as specified will be returned.

    filter_connection_name string

    Optional filtering parameter. If present, only numbers that have a connection that at least partially matches the string given will be returned. Matching is not case-sensitive. Requires at least three characters. Numbers without a connection will not be returned.

    filter_usage_payment_method string

    Possible values: [pay-per-minute, channel]

    Optional filtering parameter. If present, only numbers that have the usage_payment_method that at matches the string given will be returned. Matching is case-sensitive and only specified values are allowed.

    filter_billing_group_id string

    Optional filtering parameter. If present, only numbers with a billing_group_id matching the string given will be returned. To search for only numbers that do not have a billing_group_id, specify the literal value "null".

    order_by string

    Possible values: [order_date, phone_number, connection, usage_payment_method]

    Specify an ordering for the results. Optional parameter. If present, must be of a set number of values: "order_date", "phone_number", "connection", or "usage_payment_method". Other values are invalid and will result in the call failing. "order_date" will order numbers with the most recent purchases first, then older ones at the end. "phone_number" will sort by the phone number values. "connection" will order by the connection name with numbers not having a connection assigned yet at the end. "usage_payment_method" will put numbers with "pay-per-minute" first.

    sort_direction string

    Possible values: [reverse]

    The sort_direction specifies in which way the ordering of the connections is applied. If not present, ordering will be performed as described under the order_by parameter. You may invert this ordering by specifying "reverse" as the sort_direction. This parameter is optional.

    page integer

    Default value: 1

    Page number of results to load

    per_page integer

    Possible values: <= 1000

    Default value: 100

    Number of results per page

Responses

200: Number response

401: Unauthorized

422: Unprocessable entity. Can be caused by invalid values for ordering or filtering. Check message field in response for details.

Request samples


curl -L 'https://api.telnyx.com/origination/numbers' \
-H 'Accept: application/json'

Response samples


[
{
"id": "string",
"connection_id": "string",
"number_val_e164": "string",
"ignore_tech_prefix": true,
"enable_tech_prefix": false,
"translated_number": "string",
"forwards_to": "string",
"forwarding_type": "string",
"tag_list": [
"string"
],
"status": 1,
"purchase_failure_reason": "string",
"e911_enabled": false,
"e911_address_id": "string",
"emergency_status": "disabled",
"address_id": "string",
"usage_payment_method": "pay-per-minute",
"enable_rtp_auto_adjust": true,
"cnam_listing_enabled": false,
"cnam_listing_details": "string",
"external_pin": "string",
"t38_fax_gateway_enabled": false,
"accept_any_rtp_packets_enabled": false,
"number_val": "string",
"inbound_call_recording_enabled": false,
"inbound_call_recording_format": "wav",
"inbound_call_recording_channels": "single",
"billing_group_id": "string"
}
]