---
url: /orchestration/reference/operations/PatchWorkflow.md
description: 'PATCH /v2/consumer/workflows/{workflowId} — Patch workflow'
---

> Documentation index: https://developer.civitai.com/llms.txt — every page on this site has a markdown version at its URL + `.md`.

# Patch workflow

`PATCH https://orchestration.civitai.com/v2/consumer/workflows/{workflowId}`

Operation `PatchWorkflow` · Workflows · Civitai Orchestration API, generated from the published OpenAPI spec ([v2-consumers.json](https://developer.civitai.com/openapi/v2-consumers.json)); the interactive HTML page is this URL without `.md`.

Patches a workflow using JSON Patch. This can currently be used to cancel a workflow, update metadata and add additional tags

## Authentication

Send `Authorization: Bearer <token>` (the spec's `ApiKey` scheme); this operation documents `401 Unauthorized` for a missing or invalid token. See [Authentication](https://developer.civitai.com/orchestration/guide/authentication.md).

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `workflowId` | path | string | yes |  |

## Request body

Optional. Content type: `application/json-patch+json`.

Schema `JsonPatchDocument`: array of `JsonPatchOperation` — Array of operations to perform

Schema `JsonPatchOperation` — Describes a single operation in a JSON Patch document. Includes the operation type, the target property path, and the value to be used.

| Field | Type | Required | Description |
|---|---|---|---|
| `op` | string, one of `add`, `remove`, `replace`, `move`, `copy`, `test` | yes | The operation type. Allowed values: 'add', 'remove', 'replace', 'move', 'copy', 'test'. |
| `path` | string | yes | The JSON Pointer path to the property in the target document where the operation is to be applied. |
| `from` | string | no | Should be a path, required when using move, copy |
| `value` | any, nullable | no | The value to apply for 'add', 'replace', or 'test' operations. Not required for 'remove', 'move', or 'copy'. |

## Responses

### 204 No Content

No body.

### 400 Bad Request

Content type: `application/json`.

Schema `ProblemDetails`.

| Field | Type | Required | Description |
|---|---|---|---|
| `type` | string, nullable | no |  |
| `title` | string, nullable | no |  |
| `status` | integer (int32), nullable | no |  |
| `detail` | string, nullable | no |  |
| `instance` | string, nullable | no |  |

### 401 Unauthorized

Content type: `application/json`.

Schema `ProblemDetails` — fields as listed above.

### 403 Forbidden

Content type: `application/json`.

Schema `ProblemDetails` — fields as listed above.

### 404 Not Found

Content type: `application/json`.

Schema `ProblemDetails` — fields as listed above.
