---
title: "Update a workflow"
method: PATCH
path: "/workflows/{workflow_id}"
tags: ["Workflows"]
---

# Update a workflow

`PATCH /workflows/{workflow_id}`

Updates a specific workflow by its ID, which allows you to [configure the settings of a workflow](https://docs.zuora.com?resourceId=platform-manage-access-permissions-workflow) via API.

### User Access Permission
You must be assigned the **Workflow Manage Access** permission to run this operation.

## Path parameters

- `workflow_id` string, required

## Headers

- `Idempotency-Key` string
- `Accept-Encoding` string
- `Content-Encoding` string
- `Zuora-Track-Id` string
- `Zuora-Entity-Ids` string
- `Zuora-Org-Ids` string

## Request body

- object
  - `active_workflow_version_id` integer — The id of a version. This version will then be set to the active version of the workflow definition.
  - `description` string — The description of the workflow defintion
  - `name` string — The name of the workflow definition
  - `status` string — Can be `Active` or `Inactive`. Active workfow definitions run like normal. Inactive workflow definitions cannot be run.

## Response `200`

OK

- WorkflowDefinition — A workflow.
  - `active_version` object — Information of the active version.
    - `description` string — The description of the active version.
    - `id` integer — The unique ID of the active version.
    - `status` string — The status of the active version.
    - `type` 'Workflow::Setup' | 'Workflow::Instance' — The type of the active version. Currently the only valid value is 'Workflow::Setup'.
    - `version` string — The version number of the active version.
  - `calloutTrigger` boolean — Indicates whether the callout trigger is enabled for the retrieved workflow.
  - `createdAt` string, datetime — The date and time when the workflow is created, in the `YYYY-MM-DD HH:MM:SS` format.
  - `description` string — The description of the workflow definition.
  - `id` integer — The unique ID of the workflow definition.
  - `interval` string, nullable — The schedule of the workflow, in a CRON expression. Returns null if the schedued trigger is disabled.
  - `name` string — The name of the workflow definition.
  - `ondemandTrigger` boolean — Indicates whether the ondemand trigger is enabled for the workflow.
  - `scheduledTrigger` boolean — Indicates whether the scheduled trigger is enabled for the workflow.
  - `status` string — The status of the workflow definition.
  - `timezone` string, nullable — The timezone that is configured for the scheduler of the workflow. Returns null if the scheduled trigger is disabled.
  - `updatedAt` string, datetime — The date and time when the workflow is updated the last time, in the `YYYY-MM-DD HH:MM:SS` format.

## Other responses

- `404` — The workflow for the given id does not exist
- `422` — Bad Request for one of the following reasons: * The name or description fields are not strings. * The ondemand_trigger, callout_trigger, or scheduled_trigger fields are not booleans. * The timezone does not match one of the valid values in [this spread sheet](https://docs.google.com/spreadsheets/d/1skhepi-q5l9LyaMUPZjU_V9gzTphNMqNyV6ST5mygEo/edit?usp=sharing). * The priority is not one of High, Medium, or Low. * The status is not one of Active or Inactive. * The scheduled_trigger is set to true but a valid timezone and interval were not passed.

---

[API](https://skmtc.dev/zuora/apis/api-reference.md) · [All operations](https://skmtc.dev/zuora/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/zuora/api-reference/revisions/d11e237f3e54/schema)
