List short codes
GET/short_codes
List short codes
Request
Query Parameters
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
filter[messaging_profile_id] string
Filter by Messaging Profile ID. Use the string null
for phone numbers without assigned profiles. A synonym for the /messaging_profiles/{id}/short_codes
endpoint when querying about an extant profile.
Responses
200: Successful response with a list of short codes.
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/short_codes' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
Response samples
{
"data": [
{
"record_type": "short_code",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"short_code": "12345",
"country_code": "US",
"messaging_profile_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"created_at": "2019-01-23T18:10:02.574Z",
"updated_at": "2019-01-23T18:10:02.574Z"
}
],
"meta": {
"total_pages": 3,
"total_results": 55,
"page_number": 2,
"page_size": 25
}
}
{
"errors": [
{
"code": "string",
"title": "string",
"detail": "string",
"source": {
"pointer": "string",
"parameter": "string"
},
"meta": {}
}
]
}