Productmind API

Automations

An automation is a rule that runs one of your agent definitions when something happens in your workspace, on a schedule, or only by hand, where automations are available to your organization. List and create automations, which start disabled, then enable, update or delete them, check whether one would fire on a given item, and run one now to test it. List, filter and delete runs, and read the model and tool steps of each run. See Automations.


List a workspace's automations

GET
https://api.productmind.ai
/workspaces/{workspaceId}/automations

Every stored rule in this workspace, each with a summary of its most recent run. Requires the automation feature flag.

List a workspace's automations › path Parameters

workspaceId
​string · required

Workspace UUID

List a workspace's automations › Responses

200

List of automations

​AutomationDTO[] · required
​object
​object

Create an automation

POST
https://api.productmind.ai
/workspaces/{workspaceId}/automations

Creates a rule, always DISABLED. Enabling is a separate transition (PUT with enabled: true) that re-runs this validation, re-checks that runAsUserId still has workspace access, and computes the first nextRunAt for a schedule. The agent slug must resolve, be enabled and be async-eligible; a condition must name a field that exists for the trigger's event.

Create an automation › path Parameters

workspaceId
​string · required

Workspace UUID

Create an automation › Request Body

name
​string · minLength: 1 · maxLength: 120 · required
​AutomationTrigger · required
​AutomationAction · required
​
Default: {}
runAsUserId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…

Defaults to the calling user.

Create an automation › Responses

Created automation

​AutomationDTO · required

Get an automation

GET
https://api.productmind.ai
/workspaces/{workspaceId}/automations/{id}

Get an automation › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Automation UUID

Get an automation › Responses

200

Automation

​AutomationDTO · required

Update an automation

PUT
https://api.productmind.ai
/workspaces/{workspaceId}/automations/{id}

All fields optional. enabled: true is a TRANSITION, not a field write: it re-validates the rule, re-checks runAsUserId membership, clears disabledReason and the circuit breaker's counter, and arms the schedule. Note that enabling reaches every API container within one cache TTL (~45 s), so the first minute can fire unevenly; the per-automation rate limit is uncached and bounds it.

Update an automation › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Automation UUID

Update an automation › Request Body

name
​string · minLength: 1 · maxLength: 120
​
enabled
​boolean
runAsUserId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…

Update an automation › Responses

200

Updated automation

​AutomationDTO · required

Delete an automation

DELETE
https://api.productmind.ai
/workspaces/{workspaceId}/automations/{id}

Removes the rule. Its run history survives — the runs' automationId is set to null rather than the rows being deleted with it.

Delete an automation › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Automation UUID

Delete an automation › Responses

200

Deleted

No data returned

Run an automation once, now

POST
https://api.productmind.ai
/workspaces/{workspaceId}/automations/{id}/run

The manual trigger and the Test button. Goes through the same guardrails, writes the same run row and publishes the same queue message as an event trigger. Given an entityId, the run impersonates the rule's own event — the agent receives the same ## Trigger block a real firing would produce — and the conditions are checked first: a miss answers status: "unmatched" with the per-leaf verdict and queues nothing, unless force is set. With no entity nothing is pre-checked, since none of the conditions could be answered anyway. Answers 200 even when a guardrail refused the run — the row carries the reason.

Run an automation once, now › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Automation UUID

Run an automation once, now › Request Body

entityId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…
entityType
​string · enum
Enum values:
feature
feature_request
bug_report
task
changedFields
​string[] · maxItems: 10
input
​string · maxLength: 5000
force
​boolean

Run an automation once, now › Responses

200

Run recorded, or refused with a verdict

​AutomationRunResult · required

Check whether a rule would fire on one entity

POST
https://api.productmind.ai
/workspaces/{workspaceId}/automations/{id}/check

A dry run of the conditions: no run row, no queue message, no model call. conditions overrides the stored tree when present, so a builder can check unsaved edits. Two things a test cannot know are reported as unevaluable rather than as a miss — changedTo/changedFrom, since an entity at rest carries no before-state, and any field the event delivers only in its extra payload. Un-checkable conditions count as a pass in matched and are counted separately in unevaluable.

Check whether a rule would fire on one entity › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Automation UUID

Check whether a rule would fire on one entity › Request Body

entityId
​string · uuid · pattern: ^([0-9a-fA-F]{8}-[0-…
entityType
​string · enum
Enum values:
feature
feature_request
bug_report
task
changedFields
​string[] · maxItems: 10

Check whether a rule would fire on one entity › Responses

200

The per-condition verdict

​AutomationCheckResult · required

List entities this automation can be tested against

GET
https://api.productmind.ai
/workspaces/{workspaceId}/automations/{id}/test-entities

Recent rows of the entity type the rule's trigger event fires on, most recently updated first, optionally filtered by a substring of the title. The type is derived from the rule, never taken from the caller, so the picker cannot offer something the automation could not fire on. Empty for a schedule trigger.

List entities this automation can be tested against › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Automation UUID

List entities this automation can be tested against › query Parameters

query
​string

Substring of the entity title

limit
​string

Maximum rows, capped server-side

List entities this automation can be tested against › Responses

200

Candidate entities

​object · required

List automation runs

GET
https://api.productmind.ai
/workspaces/{workspaceId}/automation-runs

Every run in this workspace: event, schedule, manual, and the agent-definition page's Run now, which has no automation behind it. Filterable by automationId, status (one status, or a comma-separated list such as queued,running), agentSlug, triggerType, entityType, a from/to window over the creation time and finishedFrom over the finish time, searchable over the entity key and title, the agent slug, the rendered input, the error and the automation name. A skipped row is a run a guardrail refused, with the reason in error.

List automation runs › path Parameters

workspaceId
​string · required

Workspace UUID

List automation runs › query Parameters

page
​number

Page number (1-indexed, default 1)

limit
​number

Items per page (default 50)

sortBy
​string · enum

Field to sort by

Enum values:
createdAt
finishedAt
status
sortOrder
​string · enum

Sort direction (default desc)

Enum values:
asc
desc
search
​string

Free text over the entity key and title, the agent slug, the rendered input, the error and the automation name.

automationId
​string

Only runs produced by this automation

status
​

Filter by run status: a single status, or a comma-separated list of them (runs in ANY listed status); queued,running lists the runs still in flight. Unknown values are ignored, and a filter with none left applies no status filter.

agentSlug
​string · maxLength: 64
triggerType
​string · enum
Enum values:
event
schedule
manual
entityType
​string · maxLength: 64

Only runs that acted on this entity type

from
​string

ISO timestamp — only runs created at or after this moment

to
​string

ISO timestamp — only runs created at or before this moment

finishedFrom
​string · date-time · pattern: ^(?:(?:\d\d[2468][04…

ISO 8601 instant (for example 2026-10-26T09:00:00Z): only runs that finished at or after this moment. A run still in flight has no finish time and never matches. Independent of from/to, which bound the creation time. A value that is not an ISO 8601 instant is refused with 400.

List automation runs › Responses

200

List of automation runs

​AutomationRunDTO[] · required
​object
​object

Delete automation runs

POST
https://api.productmind.ai
/workspaces/{workspaceId}/automation-runs/bulk-delete

Removes run rows permanently — a run is a log, not an entity with a lifecycle, so there is no soft delete to undo. Note the per-hour rate limit COUNTS these rows, so deleting recent history lets an automation fire again sooner than its ceiling otherwise allows. Ids outside this workspace are ignored rather than refused; the response reports how many were actually removed.

Delete automation runs › path Parameters

workspaceId
​string · required

Workspace UUID

Delete automation runs › Request Body

ids
​string[] · minItems: 1 · maxItems: 200 · required

Delete automation runs › Responses

200

Number of runs deleted

No data returned

Get one automation run

GET
https://api.productmind.ai
/workspaces/{workspaceId}/automation-runs/{id}

Get one automation run › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Automation run UUID

Get one automation run › Responses

200

Automation run

​AutomationRunDTO · required

Delete one automation run

DELETE
https://api.productmind.ai
/workspaces/{workspaceId}/automation-runs/{id}

Removes the row permanently. See the bulk endpoint for the rate-limit consequence.

Delete one automation run › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Automation run UUID

Delete one automation run › Responses

200

Deleted

No data returned

Get one automation run's steps

GET
https://api.productmind.ai
/workspaces/{workspaceId}/automation-runs/{id}/telemetry

The ordered steps of the run — model calls and the tool calls each one requested, with timings, per-step tokens and truncated input/output previews. Served apart from the run itself because that payload also feeds the paginated list and a workspace-room broadcast. Null for a run that never reported one: a skipped row, or one settled by the stuck-run reaper.

Get one automation run's steps › path Parameters

workspaceId
​string · required

Workspace UUID

id
​string · required

Automation run UUID

Get one automation run's steps › Responses

200

Run telemetry

​object · required