Skip to main content

List number reservations

GET 
/number_reservations

Gets a paginated list of phone number reservations.

Request

Query Parameters

    filter[status] string

    Filter number reservations by status.

    filter[created_at][gt] string

    Filter number reservations later than this value.

    filter[created_at][lt] string

    Filter number reservations earlier than this value.

    filter[phone_numbers.phone_number] string

    Filter number reservations having these phone numbers.

    filter[customer_reference] string

    Filter number reservations via the customer reference set.

    page[number] integer

    Possible values: >= 1

    Default value: 1

    The page number to load

    page[size] integer

    Possible values: >= 1 and <= 250

    Default value: 20

    The size of the page

Responses

200: Successful response with a list of number reservations.

default: Unexpected error

Request samples


curl -L 'https://api.telnyx.com/v2/number_reservations' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'

Response samples


{
"data": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"record_type": "number_reservation",
"phone_numbers": [
{
"id": "12ade33a-21c0-473b-b055-b3c836e1c292",
"record_type": "reserved_phone_number",
"phone_number": "+19705555098",
"status": "pending",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z",
"expired_at": "2018-01-01T00:00:00.000000Z",
"errors": ""
}
],
"status": "pending",
"customer_reference": "MY REF 001",
"created_at": "2018-01-01T00:00:00.000000Z",
"updated_at": "2018-01-01T00:00:00.000000Z"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}