Skip to content

Get campaign available phone numbers

Getting a list of virtual numbers available for advertising campaigns adjustments

Method get.campaign_available_phone_numbers
Description Getting a list of all virtual numbers available to adjust the parameter phone_number_id when creating/updating a campaign
Who has access Agent, Customer

Examples of a request

Title Type Required Description
access_token string yes Authentication session key
user_id number no Unique ID of an advertising campaign
user_id number no Unique user ID of a customer or an agent that makes a request.
Is mandatory for agent
To get a list of a customer's users you need to use the method "get.customer_users"Number of returning entries . Refer to "Page-oriented output"
offset number no Offset, that defines: entries from which number to return, "limit" of entries. Default value is "0". Refer to "Page-oriented output"
filter object no Refer to "Filtering criteria"
fields array no Refer to "Providing returning data"
sort array no Refer to "Data sorting"

Parameters of reply

Title Type Valid value Filtering Sorting Description
id number yes Unique ID of a virtual number. This ID should be used in the parameter phone_number_id, method create.campaign or update.campaign
phone_number string yes Virtual number
type enum
  • va
  • call_tracking
  • user
yes Type of a virtual number
  • va - hosted PBX number
  • call_tracking - Analytics number
  • user - user number

JSON request structure

{
  "jsonrpc":"2.0",
  "id":"number",
  "method":"get.campaign_available_phone_numbers",
  "params":{
    "access_token":"string",
    "user_id":"number",
    "offset":"number",
    "limit":"number",
    "filter":{

    },
    "sort":[
      {
        "field":"string",
        "order":"string"
      }
    ],
    "fields":[
      "string"
    ]
  }
}

JSON reply structure

{
  "jsonrpc": "2.0",
  "id": "number",
  "result": {
    "metadata": {

    },
    "data": [
      {
        "id": "number",
        "phone_number": "string",
        "type": "enum"
      }
    ]
  }
}

List of returning errors

Refer to "List of errors for methods with the verb get"