Retrieve a list of short-codes belonging to the account used to make the request
Messaging short codes
Retrieve a list of short-codes belonging to the account used to make the request
Path parameters
-
The SID of the Account that created the ShortCode resource(s) to read.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^AC[0-9a-fA-F]{32}$
.
Query parameters
-
The string that identifies the ShortCode resources to read.
-
Only show the ShortCode resources that match this pattern. You can specify partial numbers and use '*' as a wildcard for any digit.
-
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum value is
1
, maximum value is1000
. -
The page index. This value is simply for client state.
Minimum value is
0
. -
The page token. This is provided by the API.
GET
/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json
curl \
--request GET 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/SMS/ShortCodes.json' \
--user "username:password"
Response examples (200)
Read full
{
"end": 0,
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/ShortCodes.json?FriendlyName=friendly_name&ShortCode=short_code&PageSize=50&Page=0",
"page": 0,
"start": 0,
"page_size": 50,
"short_codes": [
{
"sid": "SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/ShortCodes/SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json",
"sms_url": null,
"short_code": "99990",
"sms_method": "POST",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"api_version": "2010-04-01",
"date_created": "Thu, 01 Apr 2010 00:00:00 +0000",
"date_updated": "Thu, 01 Apr 2010 00:00:00 +0000",
"friendly_name": "API_CLUSTER_TEST_SHORT_CODE",
"sms_fallback_url": null,
"sms_fallback_method": "POST"
}
],
"next_page_uri": null,
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/ShortCodes.json?FriendlyName=friendly_name&ShortCode=short_code&PageSize=50&Page=0",
"previous_page_uri": null
}
{
"end": 0,
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/ShortCodes.json?FriendlyName=friendly_name&ShortCode=short_code&PageSize=50&Page=0",
"page": 0,
"start": 0,
"page_size": 50,
"short_codes": [],
"next_page_uri": null,
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SMS/ShortCodes.json?FriendlyName=friendly_name&ShortCode=short_code&PageSize=50&Page=0",
"previous_page_uri": null
}