List phone number
A Messaging Service resource to add, fetch or remove phone numbers from a Messaging Service.
Path parameters
-
The SID of the Service to read the resources from.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^MG[0-9a-fA-F]{32}$
.
GET
/v1/Services/{ServiceSid}/PhoneNumbers
curl \
--request GET 'https://messaging.twilio.com/v1/Services/{ServiceSid}/PhoneNumbers' \
--user "username:password"
Response examples (200)
{
"meta": {
"key": "phone_numbers",
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers?PageSize=20&Page=0",
"page": 0,
"page_size": 20,
"next_page_url": null,
"first_page_url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers?PageSize=20&Page=0",
"previous_page_url": null
},
"phone_numbers": [
{
"sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/PhoneNumbers/PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"capabilities": [],
"country_code": "US",
"date_created": "2015-07-30T20:12:31Z",
"date_updated": "2015-07-30T20:12:33Z",
"phone_number": "+987654321"
}
]
}