API documentation
Method list
Test your request
Changelog


addAutomaticAction
Creates a new automatic action (macro) or updates an existing one if automatic_action_id is provided.


Input parameters
typetextType of automatic action
automatic_action_idintAutomatic action ID (optional, for updating existing action)
trigger_typeintTrigger type
trigger_conditiontextTrigger condition data
group_idintGroup ID
enabledboolIs action enabled (default: true)
descriptiontextAction description
conditionsarrayList of conditions
| - 0
| - 1
| - 2
tasksarrayList of tasks
| - 0
| - 1
| - 2



Output data
The method returns the data in JSON format.
statusvarchar(30)SUCCESS - request executed correctly
ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code
automatic_action_idintCreated/updated automatic action ID
warningtextWarning message if action was disabled due to validation



Sample
Input data:
Output data:
A sample request in PHP: