Rate this page:

Scenarios

Methods

[POST]

getScenarioVariables

Copy URL

Get variables of the specified scenario.

getScenarioVariables example

getScenarioVariables example

Get variables of the specified scenario.

Parameters

Returns

[POST]

runScenario

Copy URL

Run the specified scenario.

runScenario example

runScenario example

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:

    ErrorType

    Command execution error

[GET]

searchScenarios

Copy URL

Search for the scenarios. The method without specifying the parameters returns the last 20 scenarios created.

searchScenarios example

searchScenarios example

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 requests

  • page:

    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 requests

  • per-page:

    integer

    Number of records per page (default value is 20, min = 1, max = 50).
    IMPORTANT: the parameter can be used only in GET requests

  • domain:

    string

    Your account name

  • access_token:

    string

    Your api token

Returns