Get Person Primary Available Phone Numbers
List numbers that are available to be assigned as a person's primary phone number.
By default, this API returns standard and mobile numbers from all locations that are unassigned. The parameters licenseType
and locationId
must align with the person's settings to determine the appropriate number for assignment.
Failure to provide these parameters may result in the unsuccessful assignment of the returned number.
The available numbers APIs help identify candidate numbers and their owning entities to simplify the assignment or association of these numbers to members or features.
Retrieving this list requires a full, read-only or location administrator auth token with a scope of spark-admin:telephony_config_read
.
Query Parameters
List numbers for this organization.
Return the list of phone numbers for this location within the given organization. The maximum length is 36.
Limit the number of phone numbers returned to this maximum count. The default is 2000.
Start at the zero-based offset in the list of matching phone numbers. The default is 0.
Filter phone numbers based on the comma-separated list provided in the phoneNumber
array.
Used to search numbers according to the person's licenseType
to which the number will be assigned.
Response Properties
Array of phone numbers.
A unique identifier for the phone number.
Phone number's state.
Phone number is in the active state.
Phone number is in the inactive state.
If the phone number is used as a location CLID.
The telephony type for the number.
The object is a PSTN number.
The object is a mobile number.
Mobile Network for the number if the number's telephonyType
is MOBILE_NUMBER
.
Routing Profile for the number if the number's telephonyType
is MOBILE_NUMBER
.
If true
, the phone number is a service number; otherwise, it is a standard number. Service numbers are high-utilization or high-concurrency PSTN phone numbers that are neither mobile nor toll-free.
Response Codes
The list below describes the common success and error responses you should expect from the API:
Code | Status | Description |
---|---|---|
200 | OK | Successful request with body content. |
201 | Created | The request has succeeded and has led to the creation of a resource. |
202 | Accepted | The request has been accepted for processing. |
204 | No Content | Successful request without body content. |
400 | Bad Request | The request was invalid or cannot be otherwise served. An accompanying error message will explain further. |
401 | Unauthorized | Authentication credentials were missing or incorrect. |
403 | Forbidden | The request is understood, but it has been refused or access is not allowed. |
404 | Not Found | The URI requested is invalid or the resource requested, such as a user, does not exist. Also returned when the requested format is not supported by the requested method. |
405 | Method Not Allowed | The request was made to a resource using an HTTP request method that is not supported. |
409 | Conflict | The request could not be processed because it conflicts with some established rule of the system. For example, a person may not be added to a room more than once. |
410 | Gone | The requested resource is no longer available. |
415 | Unsupported Media Type | The request was made to a resource without specifying a media type or used a media type that is not supported. |
423 | Locked | The requested resource is temporarily unavailable. A Retry-After header may be present that specifies how many seconds you need to wait before attempting the request again. |
428 | Precondition Required | File(s) cannot be scanned for malware and need to be force downloaded. |
429 | Too Many Requests | Too many requests have been sent in a given amount of time and the request has been rate limited. A Retry-After header should be present that specifies how many seconds you need to wait before a successful request can be made. |
500 | Internal Server Error | Something went wrong on the server. If the issue persists, feel free to contact the Webex Developer Support team. |
502 | Bad Gateway | The server received an invalid response from an upstream server while processing the request. Try again later. |
503 | Service Unavailable | Server is overloaded with requests. Try again later. |
504 | Gateway Timeout | An upstream server failed to respond on time. If your query uses max parameter, please try to reduce it. |
Header
Query Parameters
- orgIdstringList numbers for this organization.
- locationIdstringReturn the list of phone numbers for this location within the given organization. The maximum length is 36.
- maxnumberLimit the number of phone numbers returned to this maximum count. The default is 2000.
- startnumberStart at the zero-based offset in the list of matching phone numbers. The default is 0.
- phoneNumberarray[string]Filter phone numbers based on the comma-separated list provided in the `phoneNumber` array.
- licenseTypeenumUsed to search numbers according to the person's `licenseType` to which the number will be assigned.
{ "phoneNumbers": [ { "phoneNumber": "+12056350001", "state": "ACTIVE", "isMainNumber": false, "includedTelephonyTypes": "MOBILE_NUMBER", "mobileNetwork" : "mobileNetwork", "routingProfile" : "AttRtPf", "isServiceNumber": false }, { "phoneNumber": "+12056350002", "state": "ACTIVE", "isMainNumber": true, "telephonyType": "PSTN_NUMBER", "isServiceNumber": false }, { "phoneNumber": "+12056350003", "state": "INACTIVE", "isMainNumber": false, "telephonyType": "PSTN_NUMBER", "isServiceNumber": false } ] }