---
title: "Update a conditional logic rule"
method: PUT
path: "/workflows/{workflowId}/revisions/{revisionId}/logic-rules/{ruleId}"
tags: ["Workflow Logic Rules"]
---

# Update a conditional logic rule

`PUT /workflows/{workflowId}/revisions/{revisionId}/logic-rules/{ruleId}`

Updates a conditional logic rule on a draft workflow revision. PUT semantics: all fields must be provided. Returns the updated rule.

## Path parameters

- `workflowId` string, required
- `revisionId` string, required
- `ruleId` string, required

## Request body

- UpdateWorkflowLogicRuleRequest
  - `condition` object, required
    - `or` object[] — List of AND-groups; the OR-condition matches if any group matches.
      - `and` object[] — List of conditions that must all match (AND combined within a group).
        - `widgetId` string, required — The ID of the widget.
        - `operator` string, required — Comparison operator (e.g. `Is`, `IsNot`, `Contains`, `IsEmpty`).
        - `value` string — The option's stored value.
  - `action` 'Show' | 'Hide', required — 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.
  - `targets` object, required
    - `taskIds` string[] — IDs of the tasks this rule applies to.
    - `widgetIds` string[] — IDs of the widgets (form fields) this rule applies to.
  - `position` union — 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`.
    - object
      - `ruleId` string, required
      - `type` 'After', required — Discriminator value for this variant. See the parent oneOf for the full set of values.
    - object
      - `type` 'Bottom', required — Discriminator value for this variant. See the parent oneOf for the full set of values.
    - object
      - `type` 'Top', required — Discriminator value for this variant. See the parent oneOf for the full set of values.
  - `description` string — Optional long-form description.

## Response `200`

- PublicApiLogicRuleResponse
  - `data` object, required
    - `id` string, required — The resource's ID.
    - `condition` object, required
      - `or` object[] — List of AND-groups; the OR-condition matches if any group matches.
        - `and` object[] — List of conditions that must all match (AND combined within a group).
          - `widgetId` string, required — The ID of the widget.
          - `operator` string, required — Comparison operator (e.g. `Is`, `IsNot`, `Contains`, `IsEmpty`).
          - `value` string — The option's stored value.
    - `action` 'Show' | 'Hide', required — 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.
    - `targets` object, required
      - `taskIds` string[] — IDs of the tasks this rule applies to.
      - `widgetIds` string[] — IDs of the widgets (form fields) this rule applies to.
    - `description` string — Optional human-readable description of what this rule does.
    - `links` object[] — 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.
      - `name` string, required — Standard link relation name (RFC 5988) indicating this link's role. Common values include `self`, `edit`, `related`, `previous`, `next`.
      - `href` string, required — URL of the linked resource.
      - `rel` 'Approval Task' | 'Approvals' | 'Assignees' | 'Comment' | 'Data Set Records' | 'Data Sets' | 'Form Field Values' | 'Subject Task' | 'Task' | 'Tasks' | 'Users' | 'Webhook' | 'Workflow' | 'Workflow Run' — Optional. The kind of resource this link points to (e.g. `Workflow`, `Task`, `Comment`).
      - `type` 'Api' | 'App', required — 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.
  - `links` object[] — 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.
    - `name` string, required — Standard link relation name (RFC 5988) indicating this link's role. Common values include `self`, `edit`, `related`, `previous`, `next`.
    - `href` string, required — URL of the linked resource.
    - `rel` 'Approval Task' | 'Approvals' | 'Assignees' | 'Comment' | 'Data Set Records' | 'Data Sets' | 'Form Field Values' | 'Subject Task' | 'Task' | 'Tasks' | 'Users' | 'Webhook' | 'Workflow' | 'Workflow Run' — Optional. The kind of resource this link points to (e.g. `Workflow`, `Task`, `Comment`).
    - `type` 'Api' | 'App', required — 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.

## Other responses

- `400` — Invalid value for: body
- `default`

---

[API](https://skmtc.net/process/apis/process-street-public-api.md) · [All operations](https://skmtc.net/process/apis/process-street-public-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/process/process-street-public-api/revisions/6199a9464227/schema)
