Getting a list of scripts

Method get.scenarios
Description Getting a list of scripts
Available to Agent, Client

Request parameters

Title Type Required Description
access_token string yes Authentication session key
user_id number no Unique user identifier of the client agent on behalf of which the request is made
Is required for the agent
To obtain a list of client users, you must use the method "get.customer_users"
limit number no Number of records returned. See section Paging
offset number no Shift determines from which record number to return limit records. Default is 0. See section Paging
filter object no See section Filtering criteria
fields array no See section View of returned data
sort array no See section Sorting data

Response Options

Name Type Valid values Filtering Sorting Default response Description
id number Yes Yes Yes Unique script identifier
name string Yes Yes Yes Scenario name
virtual_phone_numbers array Yes Yes Array of virtual numbers in which the script is used
sites array Yes Yes List of sites for which the script is selected as the default script
campaigns array Yes Yes List of advertising campaigns to which virtual numbers with an active link rule with this scenario are attached
operations array Yes List of operations in the script

JSON request structure```json

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

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

} }

### JSON response structure```json
{
  "id": "number",
  "jsonrpc": "2.0",
  "result": {
    "data": [
      {
        "id": "number",
        "name": "string",
        "virtual_phone_numbers" :["string"],
        "sites":[
          {
            "site_id": "number",
            "site_domain_name": "string"
          }
        ],
       "campaigns":[
          {
            "site_id": "number",
            "site_domain_name": "string",
            "campaign_id": "number",
            "campaign_name": "string"
          }
        ]
      }
    ],
    "metadata": {
    }
  }
}

List of returned errors

See the section "List of errors for methods with the verb get"