POST
AutomationEvents.Edit
Edit an automation trigger. Only id is required; send only fields you want to change.
Permissions
- On a company subdomain (e.g. https://{user_domain}.bull36.com) the user must match that Host — Login and protected APIs reject another company with success=0, error user_not_in_company. On a main brand host (bull36.com, biz1.co.il, mastrocrm.com, …) the company domain gate is skipped.
- User must be logged in and allowed to manage automation/settings for this account.
Action
Updates the trigger definition and preserves existing action rows.
Push Service
Pushes automationevents.edit.updated to refresh automation/settings screens.
Automation
No business automation runs while editing automation configuration. It runs later only when an active trigger event happens.
Special Instructions
- On a company subdomain (e.g. https://{user_domain}.bull36.com) the user must match that Host — Login and protected APIs reject another company with success=0, error user_not_in_company. On a main brand host (bull36.com, biz1.co.il, mastrocrm.com, …) the company domain gate is skipped.
- Changing event type can affect which action recipients make sense. Re-check action nodes after event changes. Full instructions: /docs/generated/app-route-diffs/AutomationEvents.Edit.md Sample curl: curl -X POST https://{domain}/app/AutomationEvents.Edit \ -H 'Authorization: Bearer YOUR TOKEN' \ -d 'id=123' \ -d 'name=New lead trigger updated' \ -d 'par=tag' \ -d 'val=vip'
Required Parameters
| Name | Type | Sample | Explanation |
|---|---|---|---|
idpost | int | 123 | Record id to update. |
Optional Parameters
| Name | Type | Sample | What it gives |
|---|---|---|---|
namepost | string | New lead trigger | Display name for the automation trigger. |
eventpost | string | add_lead | Trigger key that starts the automation. Use one of the allowed event keys in the full Automation docs. |
positionpost | int/string | 1 | Optional UI position/order value for automation screens. |
automationpost | int | 1 | Optional display/order group. If omitted, the server sets the next value automatically. This is not the action flow_id. |
automation_statuspost | int | 1 | 1 active, 0 disabled. Use Activate/Disable to change it later. |
subscription_idpost | int/string | 7 | Legacy single subscription/product id when using subscription trigger filters. |
subscriptions_idspost | json/string | [7,8] | Subscription/product ids for subscription events. |
parpost | string | source | Primary filter dimension: source, folder, same_as_folder, tag, status, custom_fields, mission_steps, pdf_signer, project_column, internal_status, tabs_list, payment_sum, ticket_department, etc. |
valpost | string/json | website | Included values for par. For excluded values send the value prefixed with ! or use the UI exclude convention. |
par2post | string | tag | Second filter dimension applied as another condition when the event supports it. |
val2post | string/json | vip | Included/excluded values for par2. |
extra_parampost | string/json | cf-budget > 1000 | Extra include value, commonly for custom-field or event-specific filters. |
extra_param2post | string/json | cf-city = Tel Aviv | Second extra include value. |
exclude_extra_parampost | string/json | test | Extra exclude value, commonly for custom-field filters. |
exclude_extra_param2post | string/json | demo | Second extra exclude value. |
tag_namepost | string/id | vip | Tag key/name used by tag filter helpers. |
tag_name2post | string/id | hot | Second tag key/name used by par2 tag filters. |
internal_statuspost | json/string | {"1":["5"]} | Folder-to-status or tab-to-status map for internal status and tab status events. |
order_idpost | int/string | 2 | Order/document type id for order/document trigger families. |
delaypost | int | 60 | Delay before the trigger starts running, stored in minutes. |
from_datepost | date | 2026-07-22 | Start date for date/payment filters. Use UTC Y-m-d. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
to_datepost | date | 2026-07-30 | End date for date/payment filters. Use UTC Y-m-d. Send date filters and date values as UTC Y-m-d H:i:s when the route accepts date/time; date-only table columns store the Y-m-d date part. |
from_payment_sumpost | number | 100 | Minimum payment sum for payment_sum filters. |
to_payment_sumpost | number | 500 | Maximum payment sum for payment_sum filters. |
value_comparepost | number | 1000 | Single amount threshold for greater/less/equal comparisons. |
from_amtpost | number | 500 | Minimum amount for amount-between filters. |
to_amtpost | number | 2500 | Maximum amount for amount-between filters. |
date_comparepost | int | 30 | Minute threshold for WhatsApp/message time filters. |
allow_to_update_customer_alsopost | int | 1 | For add_lead triggers, allow updating an existing customer when the trigger runs. |
Authentication
Send the bearer token returned by Login in the request header. The user must be from the same company domain as this Host — a token from another company is rejected (user_not_in_company).
Authorization: Bearer YOUR TOKEN
Sample Request
{
"url": "\/app\/AutomationEvents.Edit",
"method": "POST",
"headers": {
"Authorization": "Bearer YOUR TOKEN"
},
"body": {
"id": "123",
"name": "New lead trigger updated",
"par": "tag",
"val": "vip"
},
"url_user": "https:\/\/{user}.bull36.com\/app\/AutomationEvents.Edit",
"url_domain": "https:\/\/{domain}\/app\/AutomationEvents.Edit"
}Endpoint
POST /app/AutomationEvents.Edit
POST https://{user}.bull36.com/app/AutomationEvents.Edit
POST https://{domain}/app/AutomationEvents.EditSample Output
{
"success": "1",
"message": "AutomationEvents.Edit updated",
"id": "123",
"automation_event": null,
"socket_event": "automationevents.edit.updated"
}JavaScript Example
const token = 'YOUR TOKEN';
const body = new URLSearchParams();
body.set('id', '123');
body.set('name', 'New lead trigger updated');
body.set('par', 'tag');
body.set('val', 'vip');
const res = await fetch('/app/AutomationEvents.Edit', {
method: 'POST',
headers: { Authorization: `Bearer ${token}` },
body
});
const data = await res.json();
console.log(data);Error Example
{
"success": "0",
"message": "Missing required parameter: id"
}