Event Rules
Tags: automation, events, rules
Event-driven automation rules
In the product: Actions
Resources
Request and response models used by the endpoints on this page.
CreateEventRuleRequest
| Field | Type | Required | Description |
|---|---|---|---|
actionParams | dict[str, Any] | ||
actionType | <enum EventRuleActionType | ✓ | |
active | Boolean | Default: True | |
calendarEventTypeId | Integer | ||
calendarId | Integer | ||
conditions | String | ||
dataTypeId | Integer | ||
delay | Integer | Default: 0 | |
eventType | <enum EventRuleEventType | ✓ | |
journeyStepId | Integer | ||
name | String | ||
objectType | <enum EventRuleObjectType | ✓ | |
order | Integer | Default: 0 | |
routineId | Integer | ||
taskId | Integer | ||
triggerParams | dict[str, Any] | ||
uuid | String | ||
workflowRevisionId | Integer |
Example:
{
"name": "string" // String, optional,
"uuid": "string" // String, optional,
"objectType": null // <enum EventRuleObjectType,
"eventType": null // <enum EventRuleEventType,
"conditions": "string" // String, optional,
"actionType": null // <enum EventRuleActionType,
"actionParams": {} // dict[str, Any], optional,
"triggerParams": {} // dict[str, Any], optional,
"active": false // Boolean, optional, default: True,
"taskId": 0 // Integer, optional,
"dataTypeId": 0 // Integer, optional,
"routineId": 0 // Integer, optional,
"workflowRevisionId": 0 // Integer, optional,
"calendarId": 0 // Integer, optional,
"calendarEventTypeId": 0 // Integer, optional,
"journeyStepId": 0 // Integer, optional,
"delay": 0 // Integer, optional, default: 0,
"order": 0 // Integer, optional, default: 0
}
EventRuleResponse
| Field | Type | Required | Description |
|---|---|---|---|
actionParams | Dict[str, Any] | ✓ | |
actionType | <enum EventRuleActionType | ✓ | |
active | Boolean | ✓ | |
appConnectionId | Integer | ||
calendarEventTypeId | Integer | ✓ | |
calendarId | Integer | ✓ | |
celBlockedAt | DateTime | ||
conditions | String | ✓ | |
createdAt | DateTime | ✓ | |
dataTypeId | Integer | ✓ | |
dataTypeName | String | ||
delay | Integer | ✓ | |
error | String | ✓ | |
errorMessage | String | ✓ | |
eventType | <enum EventRuleEventType | ✓ | |
failedAt | DateTime | ✓ | |
id | Integer | ✓ | |
journeyId | Integer | ||
journeyStepId | Integer | ✓ | |
name | String | ✓ | |
objectType | <enum EventRuleObjectType | ✓ | |
order | Integer | ✓ | |
routineId | Integer | ✓ | |
taskId | Integer | ✓ | |
taskName | String | ||
taskWorkflowId | Integer | ||
triggerParams | Dict[str, Any] | ✓ | |
updatedAt | DateTime | ✓ | |
uuid | String | ✓ | |
workflowRevisionId | Integer | ✓ |
Example:
{
"id": 0 // Integer,
"uuid": "string" // String,
"objectType": null // <enum EventRuleObjectType,
"name": "string" // String,
"eventType": null // <enum EventRuleEventType,
"conditions": "string" // String,
"actionType": null // <enum EventRuleActionType,
"actionParams": {} // Dict[str, Any],
"triggerParams": {} // Dict[str, Any],
"active": false // Boolean,
"createdAt": "2024-01-01T00:00:00Z" // DateTime,
"updatedAt": "2024-01-01T00:00:00Z" // DateTime,
"taskId": 0 // Integer,
"taskName": "string" // String, optional,
"taskWorkflowId": 0 // Integer, optional,
"dataTypeId": 0 // Integer,
"dataTypeName": "string" // String, optional,
"routineId": 0 // Integer,
"workflowRevisionId": 0 // Integer,
"calendarId": 0 // Integer,
"calendarEventTypeId": 0 // Integer,
"journeyStepId": 0 // Integer,
"journeyId": 0 // Integer, optional,
"appConnectionId": 0 // Integer, optional,
"error": "string" // String,
"errorMessage": "string" // String,
"failedAt": "2024-01-01T00:00:00Z" // DateTime,
"celBlockedAt": "2024-01-01T00:00:00Z" // DateTime, optional,
"delay": 0 // Integer,
"order": 0 // Integer
}
UpdateEventRuleRequest
| Field | Type | Required | Description |
|---|---|---|---|
actionParams | dict[str, Any] | ||
active | Boolean | ||
conditions | String | ||
delay | Integer | ||
name | String | ||
order | Integer | ||
triggerParams | dict[str, Any] |
Example:
{
"name": "string" // String, optional,
"conditions": "string" // String, optional,
"actionParams": {} // dict[str, Any], optional,
"triggerParams": {} // dict[str, Any], optional,
"active": false // Boolean, optional,
"delay": 0 // Integer, optional,
"order": 0 // Integer, optional
}
Endpoints
GET /api/v2/w/{workspace_uuid}/event-rules- ListPOST /api/v2/w/{workspace_uuid}/event-rules- CreateGET /api/v2/w/{workspace_uuid}/event-rules/actions/available- AvailableGET /api/v2/w/{workspace_uuid}/event-rules/executions- ExecutionsPOST /api/v2/w/{workspace_uuid}/event-rules/reorder- ReorderGET /api/v2/w/{workspace_uuid}/event-rules/search- SearchDELETE /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}- Delete Event Rule IdGET /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}- Get Event Rule IdPUT /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}- Update Event Rule IdPOST /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}/reset-cel-block- Reset Cel BlockPOST /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}/test-webhook- Test Webhook
List
GET /api/v2/w/{workspace_uuid}/event-rules
Description:
List all event rules, paginated. Requires automations:read scope.
Authorization: Requires automations:read scope
Parameters:
page(Integer) — default: 1, min: 1pageSize(Integer) — default: 25, min: 1, max: 500
Response: See PaginatedResponse[EventRuleResponse]
Create
POST /api/v2/w/{workspace_uuid}/event-rules
Description:
Create a new event rule. Requires automations:admin scope.
Authorization: Requires automations:admin scope
Parameters:
request- See CreateEventRuleRequest
Response: See EventRuleResponse
Available
GET /api/v2/w/{workspace_uuid}/event-rules/actions/available
Description:
Get all available event-action mappings.
Returns a list of event types and their valid action types. This endpoint provides the validation rules for frontend to use.
Authorization: Requires automations:read scope
Response: See EventActionMappingsResponse
Executions
GET /api/v2/w/{workspace_uuid}/event-rules/executions
Description:
List all rule executions for the workspace with cursor-based pagination. Requires automations:read scope.
Authorization: Requires automations:read scope
Parameters:
cursor(String)pageSize(Integer) — min: 1, max: 100sortBy(ExecutionSortField)sortOrder(SortOrder)ruleId(Integer)status(String)triggerType(String)actionSlug(String)objectType(EventRuleObjectType)eventType(EventRuleEventType)actionType(EventRuleActionType)workflowRevisionId(Integer)
Response: See CursorPaginatedResponse[RuleExecutionResponse]
Reorder
POST /api/v2/w/{workspace_uuid}/event-rules/reorder
Description:
Reorder event rules by updating their order field based on the provided list of IDs. Requires automations:admin scope.
Authorization: Requires automations:admin scope
Parameters:
rule_ids(Array)
Search
GET /api/v2/w/{workspace_uuid}/event-rules/search
Description:
Search for event rules matching the given criteria. Requires automations:read scope.
Authorization: Requires automations:read scope
Parameters:
objectType(EventRuleObjectType)eventType(EventRuleEventType)actionType(EventRuleActionType)taskId(Integer)dataTypeId(Integer)routineId(Integer)workflowRevisionId(Integer)calendarId(Integer)calendarEventTypeId(Integer)journeyStepId(Integer)includeDisabled(Boolean)
Response: List of EventRuleResponse
Delete Event Rule Id
DELETE /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}
Description:
Delete an event rule. Requires automations:admin scope.
Authorization: Requires automations:admin scope
Parameters:
event_rule_id(Integer)
Get Event Rule Id
GET /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}
Description:
Get a specific event rule by ID. Requires automations:read scope.
Authorization: Requires automations:read scope
Parameters:
event_rule_id(Integer)
Response: See EventRuleResponse
Update Event Rule Id
PUT /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}
Description:
Update an existing event rule. Requires automations:admin scope.
Authorization: Requires automations:admin scope
Parameters:
event_rule_id(Integer)request- See UpdateEventRuleRequest
Response: See EventRuleResponse
Reset Cel Block
POST /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}/reset-cel-block
Description:
Clear the cel_blocked_at circuit-breaker flag on an event rule.
When a rule's CEL condition fails N consecutive times the circuit breaker
trips: cel_blocked_at is set and evaluation is skipped. Call this
endpoint after saving a corrected expression, or to manually re-enable a
rule that was blocked by a transient error.
Requires automations:admin scope.
Authorization: Requires automations:admin scope
Parameters:
event_rule_id(Integer)
Response: See EventRuleResponse
Test Webhook
POST /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}/test-webhook
Description:
Send a one-off test webhook without updating rule health or webhook logs.
Authorization: Requires automations:write scope
Parameters:
event_rule_id(Integer)request- See TestWebhookRequest
Response: See TestWebhookResponse