addAutomaticAction
Creates a new automatic action (macro) or updates an existing one if automatic_action_id is provided.
Input parameters
Output data:
A sample request in PHP:
| type | text | Type of automatic action |
| automatic_action_id | int | Automatic action ID (optional, for updating existing action) |
| trigger_type | int | Trigger type |
| trigger_condition | text | Trigger condition data |
| group_id | int | Group ID |
| enabled | bool | Is action enabled (default: true) |
| description | text | Action description |
| conditions | array | List of conditions |
| | - 0 | ||
| | - 1 | ||
| | - 2 | ||
| tasks | array | List of tasks |
| | - 0 | ||
| | - 1 | ||
| | - 2 |
Output data
The method returns the data in JSON format.
| status | varchar(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_id | int | Created/updated automatic action ID |
| warning | text | Warning message if action was disabled due to validation |
Sample
Input data:Output data:
A sample request in PHP: