StartScenarios
Runs JavaScript scenarios on a Voximplant server. The scenarios run in a new media session. To start a scenario, pass the routing rule ID associated with the necessary scenario. You can use both GET and POST requests at your choice. If you need to send custom data, we recommend to use the POST method and to include the data in the custom_data field of the request body. The maximum number of concurrent HTTP-requests is limited to 200. If this number is exceeded, this method returns the 429 code error (Too Many Requests) until the number of active requests is reduced. If you exceed this number, you get the 429 error code.
Allowed roles: Owner, Admin, Developer, CallsSMS.
Example request: Start the scripts from the account.
Authentication
Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the Authorization header as a Bearer value:
Authorization: Bearer $VOXIMPLANT_TOKEN
See Authorization for ready-to-copy snippets in bash, Python, Node.js and Go that turn your credentials.json into a token.
Query parameters
The user name that can be used instead of user_id. Run the scripts from the user if set
The application name that can be used instead of application_id
The script custom data, that can be accessed in the scenario via the VoxEngine.customData() method. Use the application/x-www-form-urlencoded content type with UTF-8 encoding
Specifies the location of the server where the scenario needs to be executed. Has higher priority than reference_ip. Request getServerLocations for possible values
Response
The URL to control a created media session. You can use it for arbitrary tasks such as stopping scenario or passing additional data to it. Making HTTP request on this URL results in the AppEvents.HttpRequest VoxEngine event being triggered for scenario, with HTTP request data passed to it
The URL to control a created media session. You can use it for arbitrary tasks such as stopping scenario or passing additional data to it. Making HTTPS request on this URL results in the AppEvents.HttpRequest VoxEngine event being triggered for scenario, with HTTP request data passed to it
The call session history ID. To search a call session result, paste the ID to the GetCallHistory method's call_session_history_id parameter