Scenarios
Methods
getScenarioVariables
Get variables of the specified scenario.
Parameters
domain:
string
Your account name
access_token:
string
Your api token
request:
Get variables of the specified scenario.
Returns
Scenario variables are successfully retrieved
default:
Command execution error
runScenario
Run the specified scenario.
Parameters
domain:
string
Your account name
access_token:
string
Your api token
scenario_id:
integer
Scenario ID. The ID can be retrieved via the searchScenarios method.
phone:
string
Phone number to call.
variables:
string
Data in JSON format to be used in the scenario. {"custom_field_1": "custom_value_1", "custom_field_2": "custom_value_2", …}
caller_id:
string
Caller ID. The phone number from which the call will be made.
Returns
200:
Scenario is successfully run
default:
Command execution error
searchScenarios
Search for the scenarios. The method without specifying the parameters returns the last 20 scenarios created.
Parameters
id:
integer
Scenario ID. The ID can be retrieved via the searchScenarios method
folder_id:
integer
ID of the scenario's folder
scenario_type:
integer
Scenario type to search for. (example: scenario_type = 1 — displays only outgoing call scenarios, scenario_type = 2 — shows only incoming call scenarios)
title:
string
Scenario title to search for
with_campaigns:
integer
Set '1' to include campaigns in the search results
with_phones:
integer
Set '1' to include phone numbers in the search results
sort:
string
Sorting data by field(s), add '-' to DESC sort, (example: ‘sort=id’ or ‘sort=-id’).
IMPORTANT: the parameter can be used only in GET requestspage:
integer
Page to show as a response: the first one, second, etc. API methods return 20 records (one page) by default.
IMPORTANT: the parameter can be used only in GET requestsper-page:
integer
Number of records per page (default value is 20, min = 1, max = 50).
IMPORTANT: the parameter can be used only in GET requestsdomain:
string
Your account name
access_token:
string
Your api token
Returns
Search request is successfully performed
default:
Command execution error