Skip to main content

Event Rules

Tags: automation, events, rules

Endpoints

List

GET /api/v2/w/{workspace_uuid}/event-rules

Description:

Event-driven automation rules

List all event rules, paginated. Requires automations:read scope.

Authorization: Requires automations:read scope

Parameters:

  • page (Integer)
  • pageSize (Integer)

Response: See PaginatedResponse[EventRuleResponse]


Create

POST /api/v2/w/{workspace_uuid}/event-rules

Description:

Event-driven automation rules

Create a new event rule. Requires automations:admin scope.

Authorization: Requires automations:admin scope

Parameters:

Response: See EventRuleResponse


Available

GET /api/v2/w/{workspace_uuid}/event-rules/actions/available

Description:

Event-driven automation rules

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:

Event-driven automation rules

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)
  • sortBy (ExecutionSortField)
  • sortOrder (SortOrder)
  • ruleId (Integer)
  • status (String)
  • triggerType (String)
  • actionSlug (String)
  • objectType (EventRuleObjectType)
  • eventType (EventRuleEventType)
  • actionType (EventRuleActionType)
  • workflowId (Integer)

Response: See CursorPaginatedResponse[RuleExecutionResponse]


Reorder

POST /api/v2/w/{workspace_uuid}/event-rules/reorder

Description:

Event-driven automation rules

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)

GET /api/v2/w/{workspace_uuid}/event-rules/search

Description:

Event-driven automation rules

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)
  • workflowId (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:

Event-driven automation rules

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:

Event-driven automation rules

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:

Event-driven automation rules

Update an existing event rule. Requires automations:admin scope.

Authorization: Requires automations:admin scope

Parameters:

Response: See EventRuleResponse


Test Webhook

POST /api/v2/w/{workspace_uuid}/event-rules/{event_rule_id}/test-webhook

Description:

Event-driven automation rules

Send a one-off test webhook without updating rule health or webhook logs.

Authorization: Requires automations:write scope

Parameters:

Response: See TestWebhookResponse