curl -X GET \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--header "Authorization: Bearer YOUR_API_KEY" \
--globoff "https://api.telnyx.com/v2/phone_numbers?page[size]=10&filter[tag]=region_5&filter[phone_number]=+19705555098"
Parameters
In Query
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
filter[tag]
string
optional
Filter by phone number tags.
filter[phone_number]
string
optional
Filter by phone number. Requires at least three digits.
Non-numerical characters will result in no values being returned.
filter[status]
string
optional
Filter by phone number status.
Example: "active"Options: [
"purchase_pending",
"purchase_failed",
"port_pending",
"active",
"deleted",
"port_failed",
"emergency_only",
"ported_out",
"port_out_pending"
]filter[connection_id]
string
(int64)optional
Filter by connection_id.
Example: "1521916448077776306"filter[voice.connection_name][contains]
string
optional
Filter contains connection name. Requires at least three characters.
Example: "test"filter[voice.connection_name][starts_with]
string
optional
Filter starts with connection name. Requires at least three characters.
Example: "test"filter[voice.connection_name][ends_with]
string
optional
Filter ends with connection name. Requires at least three characters.
Example: "test"filter[voice.connection_name][eq]
string
optional
Filter by connection name.
Example: "test"filter[usage_payment_method]
string
optional
Filter by usage_payment_method.
Example: "channel"Options: [
"pay-per-minute",
"channel"
]filter[billing_group_id]
string
optional
Filter by the billing_group_id associated with phone numbers. To filter to only phone numbers that have no billing group associated them, set the value of this filter to the string 'null'.
Example: "62e4bf2e-c278-4282-b524-488d9c9c43b2"filter[emergency_address_id]
string
(int64)optional
Filter by the emergency_address_id associated with phone numbers. To filter only phone numbers that have no emergency address associated with them, set the value of this filter to the string 'null'.
Example: "9102160989215728032"filter[customer_reference]
string
optional
Filter numbers via the customer_reference set.
sort
string
optional
Specifies the sort order for results. If not given, results are sorted by created_at in descending order.
Example: "connection_name"Options: [
"purchased_at",
"phone_number",
"connection_name",
"usage_payment_method"
]Responses
200
Successful response with a list of phone numbers.
default
Unexpected error
Success Response
{
"data": {
"billing_group_id": "86f58db9-0fe3-4adc-9d1f-46e66e6e9323",
"call_forwarding_enabled": true,
"call_recording_enabled": true,
"caller_id_name_enabled": true,
"cnam_listing_enabled": true,
"connection_id": "1293384261075731499",
"connection_name": "connection-name",
"created_at": "2019-10-23T18:10:00.000Z",
"customer_reference": "customer-reference",
"emergency_address_id": "1315261609962112019",
"emergency_enabled": true,
"external_pin": "1234",
"id": "1293384261075731499",
"messaging_profile_id": "abc85f64-5717-4562-b3fc-2c9600000000",
"messaging_profile_name": "regional-customers",
"number_level_routing": "disabled",
"phone_number": "+19705555098",
"phone_number_type": "local",
"purchased_at": "2019-10-23T18:10:00.000Z",
"record_type": "phone_number",
"status": "active",
"t38_fax_gateway_enabled": true,
"tags": [
"tag_1",
"tag_2"
],
"updated_at": "2019-10-24T18:10:00.000Z"
},
"meta": {
"page_number": 2,
"page_size": 25,
"total_pages": 3,
"total_results": 55
}
}
Previous:
Number Background JobsNext:
Number OrdersWas this page helpful?