Skip to main content

Get Short Codes

This request returns a list of Short Code objects.

get /phonenumber/short_codes

Sample

A sample GET request to get short codes matching the criteria in the request URL:

curl -X GET \
'https://api.carrierx.com/core/v2/phonenumber/short_codes' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

200 status code with a list of Short Code objects:

{
"count": 1,
"has_more": false,
"items": [
{
"attributes": {},
"callback_url": null,
"country_code": "USA",
"did_group_sid": "9cf3c0aa-3f80-43f7-b8c2-8f88251ff562",
"locality": null,
"lrn_sid": null,
"name": "test",
"partner_sid": "b9ba2c8b-2368-4a0b-9ba0-866ff2618417",
"short_code": "26399",
"short_code_sid": "531f65b7-dff7-42b4-b638-597f91da9ccc",
"state": "IL",
"string_key_1": null,
"string_key_2": null
}
],
"limit": 10,
"offset": 0,
"pagination": {},
"total": 1
}

This request is enabled for Pagination, Result Filtering, and Field Filtering.

Required Scopes

To get information about Short Code objects, the partner must have one of the following scopes enabled:

  • phonenumber.manage
  • phonenumber.read

Query Arguments

ParameterData TypeDescription
with_relatedbooleanDetermines if the partner information related to the short code should be shown. Values accepted in this field are true and false. The default value is false.