Create Rule
Create a new automation rule for opportunities.
Payload fields:
name(required): Rule name - max 191 charsdescription(optional): Free text - max 1000 charsentity_type(required): “opportunity” for this endpointtrigger_type(required): Valid TriggerType enum (e.g. OPPORTUNITY_STAGE_CHANGED, OPPORTUNITY_WON, OPPORTUNITY_LOST)priority(optional): Integer 0-100 - lower fires first - default 50is_active(optional): Boolean - default truestop_subsequent_rules(optional): Boolean - if true, halts rule chain on matchcooldown_hours(optional): Integer hours - dedupe within window - null = no cooldownconditions[](required, min 1): Array of condition rows (see Leads/Create Rule for sub-keys)actions[](required, min 1): Array of action rows (see Leads/Create Rule for sub-keys)
Payload fields:
name(required): Rule name - max 191 charsdescription(optional): Free text - max 1000 charsentity_type(required): “lead” or “opportunity” matching the routetrigger_type(required): Valid TriggerType enum casepriority(optional): Integer 0-100 - lower fires first - default 50is_active(optional): Boolean - default truestop_subsequent_rules(optional): Boolean - halts chain when truecooldown_hours(optional): Integer hours - dedupe within window - blank = no cooldownconditions[i][...](required, min 1): condition rows. Each row hasfield_path,operator, one ofvalue_int|value_string|value_array|value_bool|value_datetime(polymorphic by operator), and optionalsort_order.actions[i][...](required, min 1): action rows. Each row hasaction_type,sort_order, and action_type-specific keys (e.g.assign_pool_idforASSIGN_USER).
Headers
{{tenant_key_name}}
Request
This endpoint expects a multipart form.
name
Required: Rule name - max 191 chars
priority
Optional: Integer 0-100 - lower fires first - default 50
is_active
Optional: bool - default true
description
Optional: Free text - max 1000 chars
entity_type
Required: “opportunity” for this endpoint
trigger_type
Required: Valid TriggerType enum case
stop_subsequent_rules
Optional: bool - halts chain on match
actions[0][sort_order]
Optional: Integer - default 0
actions[0][action_type]
Required: ASSIGN_USER|CHANGE_STAGE|TAG|NOTIFY|…
conditions[0][operator]
Required: EQUALS|NOT_EQUALS|IN|NOT_IN|GT|GTE|LT|LTE|CONTAINS|EXISTS|…
conditions[0][field_path]
Required: Dotted accessor (e.g. opportunity.opportunity_stage_id)
conditions[0][sort_order]
Optional: Integer - default 0
actions[0][assign_pool_id]
Conditional: required when action_type=ASSIGN_USER. User pool UUID.
Response
Successful response

