Skip to content

Retrieves virtual numbers available for activation

Method get.available_virtual_numbers
Description Retrieves virtual numbers available for activation
Who has access Agents and clients

Request parameters

Name Type Required Description
access_token string yes Session key used to authenticate the request
user_id number no Unique ID of the client user on whose behalf the request is made. Required when an agent makes the request. To retrieve a list of client users, call "get.customer_users".
limit number no Maximum number of records to return. See the "Paging" section.
offset number no Number of records to skip before returning results. Default: 0. See the "Paging" section.
filter object no Filtering criteria. See the "Filters" section.
fields array no Fields to include in the response. See the "Viewing returned data" section.
sort array no Sorting criteria. See the "Data sorting" section.

Response parameters

Name Type Valid values Filtering Sorting Description
phone_number string yes yes Virtual phone number
category enum usual
bronze
silver
gold
yes yes Number category
location_mnemonic enum yes yes Region code
location_name string yes Region name
onetime_payment number One-time activation fee
monthly_charge number Monthly fee
min_charge number Minimum monthly charge

JSON request structure

{
  "jsonrpc": "2.0",
  "id": "number",
  "method": "get.available_virtual_numbers",
  "params": {
    "access_token": "string",
    "user_id": "number",
    "offset": "number",
    "limit": "number",
    "filter": {},
    "sort": [
      {
        "field": "string",
        "order": "string"
      }
    ],
    "fields": [
      "string"
    ]
  }
}

JSON response structure

{
  "jsonrpc": "2.0",
  "id": "number",
  "result": {
    "metadata": {},
    "data": [
      {
        "phone_number": "string",
        "category": "enum",
        "location_mnemonic": "enum",
        "location_name": "string",
        "onetime_payment": "number",
        "monthly_charge": "number",
        "min_charge":"number"
      }
    ]
  }
}

List of returned errors

For errors common to all methods, see the Data API — General documentation.