Skip to main content

Routines

Tags: automation, routines

Endpoints

List

GET /api/v2/w/{workspace_uuid}/routines

Description:

Routines — the unified automation primitive (schedule, webhook, and system-event triggers)

List all Routines for the workspace with pagination.

Visibility rules: a member sees Routines they own (any visibility) plus workspace-visible Routines owned by others. Private Routines owned by other members are hidden by default. Callers with AUTOMATIONS_ADMIN can request owner=all_including_private to see every routine in the workspace for administrative operations.

The owner query param narrows within what the caller is allowed to see — it cannot widen access beyond the caller's scopes.

Authorization: Requires automations:read scope

Parameters:

  • page (Integer)
  • pageSize (Integer)
  • sortBy (RoutineSortField)
  • sortOrder (SortOrder)
  • owner (String)

Response: See PaginatedResponse[RoutineResponse]


Create

POST /api/v2/w/{workspace_uuid}/routines

Description:

Routines — the unified automation primitive (schedule, webhook, and system-event triggers)

Create a new Routine.

Authorization: Requires automations:write scope

Parameters:

Response: See RoutineResponse


Preview Schedule

POST /api/v2/w/{workspace_uuid}/routines/preview-schedule

Description:

Routines — the unified automation primitive (schedule, webhook, and system-event triggers)

Preview the next N run times for a cron expression.

Authorization: Requires automations:read scope

Parameters:

Response: See SchedulePreviewResponse


Runs

GET /api/v2/w/{workspace_uuid}/routines/runs

Description:

Routines — the unified automation primitive (schedule, webhook, and system-event triggers)

List all Routine runs for the workspace with pagination.

Only runs for Routines the caller can see are returned — i.e. runs of their own Routines plus runs of workspace-visible Routines owned by others. Without the visibility join a caller with AUTOMATIONS_READ could enumerate history of any private Routine by guessing routineId.

Authorization: Requires automations:read scope

Parameters:

  • page (Integer)
  • pageSize (Integer)
  • sortBy (EventRunSortField)
  • sortOrder (SortOrder)
  • routineId (Integer)
  • status (String)

Response: See PaginatedResponse[RoutineRunResponse]


Delete Event Id

DELETE /api/v2/w/{workspace_uuid}/routines/{event_id}

Description:

Routines — the unified automation primitive (schedule, webhook, and system-event triggers)

Delete a Routine.

Authorization: Requires automations:admin scope

Parameters:

  • event_id (Integer)

Get Event Id

GET /api/v2/w/{workspace_uuid}/routines/{event_id}

Description:

Routines — the unified automation primitive (schedule, webhook, and system-event triggers)

Get a specific Routine by ID.

Authorization: Requires automations:read scope

Parameters:

  • event_id (Integer)

Response: See RoutineResponse


Update Event Id

PUT /api/v2/w/{workspace_uuid}/routines/{event_id}

Description:

Routines — the unified automation primitive (schedule, webhook, and system-event triggers)

Update an existing Routine.

Authorization: Requires automations:write scope

Parameters:

Response: See RoutineResponse


Run

POST /api/v2/w/{workspace_uuid}/routines/{event_id}/run

Description:

Routines — the unified automation primitive (schedule, webhook, and system-event triggers)

Run a Routine manually.

Authorization: Requires automations:write scope

Parameters:

  • event_id (Integer)
  • member_id (Integer)
  • member_filter_id (Integer)

Delete Runs

DELETE /api/v2/w/{workspace_uuid}/routines/{event_id}/runs

Description:

Routines — the unified automation primitive (schedule, webhook, and system-event triggers)

Reset/clear all runs for a Routine. This removes all run history for the Routine.

Authorization: Requires automations:admin scope

Parameters:

  • event_id (Integer)