Phones
List Own Numbers
Gets a list of all phone numbers owned by you. For each number, its status is returned along with the identifier of the Messaging Config that the number is attached to. This method supports pagination.
AuthorizationBasic <token>
Basic Authorization header using the BASIC scheme. Use a pair companySid:token to access the API.
In: header
Query Parameters
Number?string
Search by a phone number substring.
Match
^\+?[0-9]+$Length
3 <= length <= 16Name?string
Search by a phone name substring.
Length
3 <= length <= 1024Status?array<>
Phone statuses.
Items
items <= 8Type?string
Phone number type.
Value in
- "TollFree"
- "TenDlc"
MessagingConfigSid?string
Messaging Config SID.
This field is mutually exclusive with OnlyWithoutMessagingConfig.
Match
^(MC)[0-9a-f]{32}$OnlyWithoutMessagingConfig?boolean
If true, returns only numbers that are not assigned to any messaging config.
This field is mutually exclusive with MessagingConfigSid.
PageSize?integer
Format
int32Range
1 <= value <= 10000OrderByDirection?string
Possible values:
-
Ascending
-
Descending
Value in
- "Ascending"
- "Descending"
SearchId?string
Response Body
curl -X GET "https://example.com/v1/Phones"{ "items": [ { "createdOn": "2023-09-09T15:00:00.000Z", "number": "+12345678900", "name": "My First Phone", "messagingConfigSid": "MCf4f1e0ccde19431ebde74a9f2996afa0", "status": "Active", "voiceStatus": "OffPlatform" } ], "searchId": "string"}{ "errors": { "Name": [ "The Name field is required." ] }, "type": "https://tools.ietf.org/html/rfc7231#section-6.5.1", "title": "One or more validation errors occurred.", "status": 400, "detail": "Some detailed message", "traceId": "|4ef17786-b103-420e-89c0-cc425ac14809.edfcbee9_"}