openapi: 3.1.0
info:
title: Process Street Public Attachments Workflow Logic Rules API
version: '1.1'
description: "The Process Street API is organized around REST. Our API has predictable resource-oriented URLs,\naccepts JSON-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response\ncodes, authentication, and verbs.\n\nAn [MCP server](https://www.process.st/help/docs/mcp-server/) is also available for integrating with AI agents and tools.\n\n## Core concepts\n\n**Workflow vs Workflow Run.** A **Workflow** (sometimes called a \"playbook\" or template) is the reusable\ndefinition — tasks, form fields, logic, automations. A **Workflow Run** (sometimes called a \"checklist\")\nis one *instance* of running a Workflow. You list available templates via `listWorkflows`; you start one\nvia `createWorkflowRun` (or by scheduling); and you read or update the live state of an in-progress run\nvia the Workflow Runs / Tasks / Form Field Values endpoints. The two are easy to confuse — when in doubt,\n\"Workflow\" is the *blueprint*, \"Workflow Run\" is *one execution*.\n\n**Pages** are similar but standalone: a Page is a content document (no tasks/form fields). A\n**Page Revision** is a versioned snapshot of its content.\n\n## IDs\n\nAll resource IDs are opaque 22-character URL-safe strings (Muids — a base64-encoded UUID). Treat them\nas opaque tokens. Do not parse them, attempt to sort by them, or assume any internal structure. You can\ncompare two IDs for equality with a plain string comparison.\n\n## Dates and times\n\nAll timestamps in requests and responses are ISO-8601, UTC, with millisecond precision\n(e.g. `2024-09-15T14:32:00.000Z`). For date-only fields (typically due dates), use a calendar date\n(`2024-09-15`).\n\n## Pagination\n\nList endpoints page through results using an opaque cursor named `_` (yes, just an underscore).\nThe flow:\n\n1. Call the list endpoint without `_` to get the first page.\n2. Each response includes a `links[]` array. If there are more pages, you'll find an entry with\n `name: \"next\"` whose `href` is a fully-formed URL you can `GET` directly.\n3. Keep following `next.href` until the `next` link is absent — that's the end.\n\nYou can also reuse the `_` value from one response by passing it as the `_` query parameter on the\nnext request, but **following the `href` is simpler and forward-compatible**.\n\n## Authentication\n\nEvery request must include an API key as `X-API-KEY: <your-key>`. Generate keys from your\norganization settings in the Process Street app. Each key carries the permissions of the user that\ncreated it.\n\n## Idempotency and retries\n\n- `GET` requests are safe to retry on any error.\n- `PUT` requests are idempotent — calling them twice with the same body is equivalent to calling once.\n Safe to retry on `5xx`.\n- `DELETE` is idempotent (deleting an already-deleted resource returns `404`, which is fine to ignore).\n- `POST` is generally **not** safe to blindly retry. For workflow runs, attach a `referenceId`\n on create — calling `createWorkflowRun` twice with the same `referenceId` will return the existing\n run instead of creating a duplicate.\n\n## Errors\n\nErrors are returned as a JSON object with this shape:\n\n```json\n{\n \"error\": \"human-readable message\",\n \"errorCode\": \"NotFound\",\n \"requestId\": \"abc123…\",\n \"details\": { \"fieldPath\": \"what went wrong\" }\n}\n```\n\n**When present**, branch on `errorCode` rather than regex'ing `error` (we may rewrite the wording). Include\n`requestId` if you contact support so we can find the request in our logs.\n\n`errorCode` and `requestId` are populated on responses generated by the public API exception handler, which\ncovers the great majority of errors. A few low-level failures (e.g. JSON parse failures caught before the\nhandler runs, framework-level routing errors) may return an `ErrorInfo` without these fields. In that case,\nfall back to the HTTP status code (`400`/`401`/`403`/`404`/`409`/`422`/`429`/`5xx`) — its semantics match\nthe corresponding `errorCode` value.\n\n## Rate limits\n\nAll requests are subject to rate limits. If you receive a `429` response, wait for the duration\nspecified in the `Retry-After` header before retrying.\n"
servers:
- url: https://public-api.process.st/api/v1.1
tags:
- name: Workflow Logic Rules
description: 'Workflow logic rules are conditional rules that control the visibility of tasks
and form fields within a workflow revision. Use these endpoints to create, view,
and manage logic rules.'
externalDocs:
url: https://www.process.st/help/docs/conditional-logic/
description: Process Street help article
paths:
/workflows/{workflowId}/revisions/{revisionId}/logic-rules:
get:
tags:
- Workflow Logic Rules
summary: List all conditional logic rules
description: Returns a paginated list of conditional logic rules for a workflow revision, sorted by order tree.
operationId: listWorkflowRevisionLogicRules
parameters:
- name: workflowId
in: path
description: The ID of the Workflow
required: true
schema:
type: string
- name: revisionId
in: path
description: The ID of the Revision
required: true
schema:
type: string
- name: _
in: query
description: 'Opaque pagination cursor. Take this value from the previous response''s `links[]` entry whose `name`
is `"next"` (typically just follow that link''s `href` instead of reading this value).
Omit on the first page. If the previous response had no `next` link, there are no more pages.'
required: false
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PublicApiLogicRuleListResponse'
default:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorInfo'
security:
- apiKeyAuth: []
- httpAuth: []
post:
tags:
- Workflow Logic Rules
summary: Create a conditional logic rule
description: Creates a conditional logic rule on a draft workflow revision.
operationId: createWorkflowRevisionLogicRule
parameters:
- name: workflowId
in: path
description: The ID of the Workflow
required: true
schema:
type: string
- name: revisionId
in: path
description: The ID of the Revision
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateWorkflowLogicRuleRequest'
examples:
Simple condition:
summary: Show a task when a form field value is Active
value:
condition:
or:
- and:
- widgetId: lJV3-hTDnBHrNjxm51dD4A
operator: Is
value: Active
action: Show
targets:
taskIds:
- mCUPuFwPK_1sHFjYZfhAJQ
widgetIds: []
description: Show task when Status is Active
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PublicApiLogicRuleResponse'
'400':
description: 'Invalid value for: body'
content:
text/plain:
schema:
type: string
default:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorInfo'
security:
- apiKeyAuth: []
- httpAuth: []
/workflows/{workflowId}/revisions/{revisionId}/logic-rules/{ruleId}:
get:
tags:
- Workflow Logic Rules
summary: Get a conditional logic rule
description: Returns a conditional logic rule by its ID.
operationId: getWorkflowRevisionLogicRule
parameters:
- name: workflowId
in: path
description: The ID of the Workflow
required: true
schema:
type: string
- name: revisionId
in: path
description: The ID of the Revision
required: true
schema:
type: string
- name: ruleId
in: path
description: The ID of the Logic Rule
required: true
schema:
type: string
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PublicApiLogicRuleResponse'
default:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorInfo'
security:
- apiKeyAuth: []
- httpAuth: []
put:
tags:
- Workflow Logic Rules
summary: Update a conditional logic rule
description: 'Updates a conditional logic rule on a draft workflow revision. PUT semantics: all fields must be provided. Returns the updated rule.'
operationId: updateWorkflowRevisionLogicRule
parameters:
- name: workflowId
in: path
description: The ID of the Workflow
required: true
schema:
type: string
- name: revisionId
in: path
description: The ID of the Revision
required: true
schema:
type: string
- name: ruleId
in: path
description: The ID of the Logic Rule
required: true
schema:
type: string
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateWorkflowLogicRuleRequest'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/PublicApiLogicRuleResponse'
'400':
description: 'Invalid value for: body'
content:
text/plain:
schema:
type: string
default:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorInfo'
security:
- apiKeyAuth: []
- httpAuth: []
delete:
tags:
- Workflow Logic Rules
summary: Delete a conditional logic rule
description: Deletes a conditional logic rule from a draft workflow revision.
operationId: deleteWorkflowRevisionLogicRule
parameters:
- name: workflowId
in: path
description: The ID of the Workflow
required: true
schema:
type: string
- name: revisionId
in: path
description: The ID of the Revision
required: true
schema:
type: string
- name: ruleId
in: path
description: The ID of the Logic Rule
required: true
schema:
type: string
responses:
'204':
description: ''
default:
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorInfo'
security:
- apiKeyAuth: []
- httpAuth: []
components:
schemas:
CreateWorkflowLogicRuleRequest:
title: CreateWorkflowLogicRuleRequest
type: object
required:
- condition
- action
- targets
properties:
condition:
title: OrCondition
type: object
properties:
or:
description: List of AND-groups; the OR-condition matches if any group matches.
type: array
items:
title: AndGroup
type: object
properties:
and:
description: List of conditions that must all match (AND combined within a group).
type: array
items:
title: LeafCondition
type: object
required:
- widgetId
- operator
properties:
widgetId:
title: EntityID
description: The ID of the widget.
type: string
operator:
description: Comparison operator (e.g. `Is`, `IsNot`, `Contains`, `IsEmpty`).
type: string
value:
description: The option's stored value.
type: string
action:
title: WorkflowLogicRuleAction
description: What the rule does to its targets when conditions match. `Show` reveals tasks/widgets that are hidden by default. `Hide` conceals tasks/widgets that are visible by default.
type: string
enum:
- Show
- Hide
targets:
title: PublicApiTargets
type: object
properties:
taskIds:
description: IDs of the tasks this rule applies to.
type: array
items:
title: EntityID
type: string
widgetIds:
description: IDs of the widgets (form fields) this rule applies to.
type: array
items:
title: EntityID
type: string
position:
title: RulePosition
description: Where to place this logic rule in the workflow revision. `Top` — before all existing rules. `Bottom` — after all existing rules (default when `position` is omitted). `After` — immediately after the rule identified by `ruleId`.
oneOf:
- title: RulePositionAfter
type: object
required:
- ruleId
- type
properties:
ruleId:
title: EntityID
type: string
type:
description: Discriminator value for this variant. See the parent oneOf for the full set of values.
type: string
const: After
- title: RulePositionBottom
type: object
required:
- type
properties:
type:
description: Discriminator value for this variant. See the parent oneOf for the full set of values.
type: string
const: Bottom
- title: RulePositionTop
type: object
required:
- type
properties:
type:
description: Discriminator value for this variant. See the parent oneOf for the full set of values.
type: string
const: Top
discriminator:
propertyName: type
mapping:
After: '#/components/schemas/RulePositionAfter'
Bottom: '#/components/schemas/RulePositionBottom'
Top: '#/components/schemas/RulePositionTop'
description:
description: Optional long-form description.
type: string
maxLength: 255
UpdateWorkflowLogicRuleRequest:
title: UpdateWorkflowLogicRuleRequest
type: object
required:
- condition
- action
- targets
properties:
condition:
title: OrCondition
type: object
properties:
or:
description: List of AND-groups; the OR-condition matches if any group matches.
type: array
items:
title: AndGroup
type: object
properties:
and:
description: List of conditions that must all match (AND combined within a group).
type: array
items:
title: LeafCondition
type: object
required:
- widgetId
- operator
properties:
widgetId:
title: EntityID
description: The ID of the widget.
type: string
operator:
description: Comparison operator (e.g. `Is`, `IsNot`, `Contains`, `IsEmpty`).
type: string
value:
description: The option's stored value.
type: string
action:
title: WorkflowLogicRuleAction
description: What the rule does to its targets when conditions match. `Show` reveals tasks/widgets that are hidden by default. `Hide` conceals tasks/widgets that are visible by default.
type: string
enum:
- Show
- Hide
targets:
title: PublicApiTargets
type: object
properties:
taskIds:
description: IDs of the tasks this rule applies to.
type: array
items:
title: EntityID
type: string
widgetIds:
description: IDs of the widgets (form fields) this rule applies to.
type: array
items:
title: EntityID
type: string
position:
title: RulePosition
description: Where to place this logic rule in the workflow revision. `Top` — before all existing rules. `Bottom` — after all existing rules (default when `position` is omitted). `After` — immediately after the rule identified by `ruleId`.
oneOf:
- title: RulePositionAfter
type: object
required:
- ruleId
- type
properties:
ruleId:
title: EntityID
type: string
type:
description: Discriminator value for this variant. See the parent oneOf for the full set of values.
type: string
const: After
- title: RulePositionBottom
type: object
required:
- type
properties:
type:
description: Discriminator value for this variant. See the parent oneOf for the full set of values.
type: string
const: Bottom
- title: RulePositionTop
type: object
required:
- type
properties:
type:
description: Discriminator value for this variant. See the parent oneOf for the full set of values.
type: string
const: Top
discriminator:
propertyName: type
mapping:
After: '#/components/schemas/RulePositionAfter'
Bottom: '#/components/schemas/RulePositionBottom'
Top: '#/components/schemas/RulePositionTop'
description:
description: Optional long-form description.
type: string
maxLength: 255
PublicApiLogicRuleListResponse:
title: PublicApiLogicRuleListResponse
type: object
properties:
data:
description: The list of resources returned by this request.
type: array
items:
title: PublicApiLogicRule
type: object
required:
- id
- condition
- action
- targets
properties:
id:
title: EntityID
description: The resource's ID.
type: string
condition:
title: OrCondition
type: object
properties:
or:
description: List of AND-groups; the OR-condition matches if any group matches.
type: array
items:
title: AndGroup
type: object
properties:
and:
description: List of conditions that must all match (AND combined within a group).
type: array
items:
title: LeafCondition
type: object
required:
- widgetId
- operator
properties:
widgetId:
title: EntityID
description: The ID of the widget.
type: string
operator:
description: Comparison operator (e.g. `Is`, `IsNot`, `Contains`, `IsEmpty`).
type: string
value:
description: The option's stored value.
type: string
action:
title: WorkflowLogicRuleAction
description: What the rule does to its targets when conditions match. `Show` reveals tasks/widgets that are hidden by default. `Hide` conceals tasks/widgets that are visible by default.
type: string
enum:
- Show
- Hide
targets:
title: PublicApiTargets
type: object
properties:
taskIds:
description: IDs of the tasks this rule applies to.
type: array
items:
title: EntityID
type: string
widgetIds:
description: IDs of the widgets (form fields) this rule applies to.
type: array
items:
title: EntityID
type: string
description:
description: Optional human-readable description of what this rule does.
type: string
links:
description: Navigable HATEOAS links to related resources. Each entry has a `name` (RFC-5988 link relation like `self`, `edit`, `related`), an `href` URL, and a `type` (`Api` for callable endpoints, `App` for browser-facing URLs). Prefer following these `href` values over constructing URLs by hand.
type: array
items:
title: Link
description: A HATEOAS link to a related resource. Use these to navigate between resources without constructing URLs by hand.
type: object
required:
- name
- href
- type
properties:
name:
description: Standard link relation name (RFC 5988) indicating this link's role. Common values include `self`, `edit`, `related`, `previous`, `next`.
type: string
href:
title: Uri
description: URL of the linked resource.
examples:
- https://api.process.st/api/v1.1/resource/XXX
type: string
rel:
description: Optional. The kind of resource this link points to (e.g. `Workflow`, `Task`, `Comment`).
type: string
enum:
- Approval Task
- Approvals
- Assignees
- Comment
- Data Set Records
- Data Sets
- Form Field Values
- Subject Task
- Task
- Tasks
- Users
- Webhook
- Workflow
- Workflow Run
type:
description: Whether this link targets an API endpoint or a Process Street app URL. `Api` — a callable API endpoint you can fetch directly. `App` — a browser-facing URL in the Process Street UI.
type: string
enum:
- Api
- App
links:
description: 'Pagination links. When the result has more pages, look for an entry with `name: "next"` — its `href` is the URL to fetch the next page. Absence of `next` means there are no more pages. For single-resource responses this array is typically empty.'
type: array
items:
title: Link
description: A HATEOAS link to a related resource. Use these to navigate between resources without constructing URLs by hand.
type: object
required:
- name
- href
- type
properties:
name:
description: Standard link relation name (RFC 5988) indicating this link's role. Common values include `self`, `edit`, `related`, `previous`, `next`.
type: string
href:
title: Uri
description: URL of the linked resource.
examples:
- https://api.process.st/api/v1.1/resource/XXX
type: string
rel:
description: Optional. The kind of resource this link points to (e.g. `Workflow`, `Task`, `Comment`).
type: string
enum:
- Approval Task
- Approvals
- Assignees
- Comment
- Data Set Records
- Data Sets
- Form Field Values
- Subject Task
- Task
- Tasks
- Users
- Webhook
- Workflow
- Workflow Run
type:
description: Whether this link targets an API endpoint or a Process Street app URL. `Api` — a callable API endpoint you can fetch directly. `App` — a browser-facing URL in the Process Street UI.
type: string
enum:
- Api
- App
PublicApiLogicRuleResponse:
title: PublicApiLogicRuleResponse
type: object
required:
- data
properties:
data:
title: PublicApiLogicRule
type: object
required:
- id
- condition
- action
- targets
properties:
id:
title: EntityID
description: The resource's ID.
type: string
condition:
title: OrCondition
type: object
properties:
or:
description: List of AND-groups; the OR-condition matches if any group matches.
type: array
items:
title: AndGroup
type: object
properties:
and:
description: List of conditions that must all match (AND combined within a group).
type: array
items:
title: LeafCondition
type: object
required:
- widgetId
- operator
properties:
widgetId:
title: EntityID
description: The ID of the widget.
type: string
operator:
description: Comparison operator (e.g. `Is`, `IsNot`, `Contains`, `IsEmpty`).
type: string
value:
description: The option's stored value.
type: string
action:
title: WorkflowLogicRuleAction
description: What the rule does to its targets when conditions match. `Show` reveals tasks/widgets that are hidden by default. `Hide` conceals tasks/widgets that are visible by default.
type: string
enum:
- Show
- Hide
targets:
title: PublicApiTargets
type: object
properties:
taskIds:
description: IDs of the tasks this rule applies to.
type: array
items:
title: EntityID
type: string
widgetIds:
description: IDs of the widgets (form fields) this rule applies to.
type: array
items:
title: EntityID
type: string
description:
description: Optional human-readable description of what this rule does.
type: string
links:
description: Navigable HATEOAS links to related resources. Each entry has a `name` (RFC-5988 link relation like `self`, `edit`, `related`), an `href` URL, and a `type` (`Api` for callable endpoints, `App` for browser-facing URLs). Prefer following these `href` values over constructing URLs by hand.
type: array
items:
title: Link
description: A HATEOAS link to a related resource. Use these to navigate between resources without constructing URLs by hand.
type: object
required:
- name
- href
- type
properties:
name:
description: Standard link relation name (RFC 5988) indicating this link's role. Common values include `self`, `edit`, `related`, `previous`, `next`.
type: string
href:
title: Uri
description: URL of the linked resource.
examples:
- https://api.process.st/api/v1.1/resource/XXX
type: string
rel:
description: Optional. The kind of resource this link points to (e.g. `Workflow`, `Task`, `Comment`).
type: string
enum:
- Approval Task
- Approvals
- Assignees
- Comment
- Data Set Records
- Data Sets
- Form Field Values
- Subject Task
- Task
- Tasks
- Users
- Webhook
- Workflow
- Workflow Run
type:
description: Whether this link targets an API endpoint or a Process Street app URL. `Api` — a callable API endpoint you can fetch directly. `App` — a browser-facing URL in the Process Street UI.
type: string
enum:
- Api
- App
links:
description: 'Pagination links. When the result has more pages, look for an entry with `name: "next"` — its `href` is the URL to fetch the next page. Absence of `next` means there are no more pages. For single-resource responses this array is typically empty.'
type: array
items:
title: Link
description: A HATEOAS link to a related resource. Use these to navigate between resources without constructing URLs by hand.
type: object
required:
- name
# --- truncated at 32 KB (35 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/process-street/refs/heads/main/openapi/process-street-workflow-logic-rules-api-openapi.yml