---
url: /orchestration/reference/operations/UpdateWorkflow.md
description: 'PUT /v2/consumer/workflows/{workflowId} — Update workflow'
---

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

# Update workflow

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

Operation `UpdateWorkflow` · 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`.

Updates a workflow. This can currently be used to cancel a workflow or override metadata and/or 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 |  |
| `whatif` | query | boolean | no | Whether to apply the update or return what it would cost. (default `false`) |

## Request body

Optional. Content types: `application/json`, `text/json`, `application/*+json`.

Schema `UpdateWorkflowRequest`.

| Field | Type | Required | Description |
|---|---|---|---|
| `status` | `UpdateWorkflowStatus` (one of `canceled`) | no |  |
| `metadata` | object, nullable | no |  |
| `tags` | array of string, nullable | no |  |
| `allowMatureContent` | boolean, nullable | no | Set to true to remove the mature content restriction on the workflow. |
| `downloadPriority` | `Priority` (one of `high`, `normal`, `low`, `idle`) | no | Raise the download priority for resources this workflow needs but the fleet does not hold. Only High may be requested, and it carries a Buzz charge for each cold resource above the free size threshold. |

## Responses

### 200 OK

Content type: `application/json`.

Schema `Workflow`.

| Field | Type | Required | Description |
|---|---|---|---|
| `id` | string, nullable | no |  |
| `createdAt` | string (date-time) | yes |  |
| `transactions` | `TransactionSummary` | no |  |
| `metadata` | object | yes |  |
| `status` | `WorkflowStatus` (one of `unassigned`, `preparing`, `scheduled`, `processing`, `succeeded`, `failed`, `expired`, `canceled`) | yes |  |
| `startedAt` | string (date-time), nullable | no |  |
| `completedAt` | string (date-time), nullable | no |  |
| `tags` | array of string | yes | Indexed for searching; at most 10 per workflow. |
| `arguments` | object | yes |  |
| `steps` | array of `WorkflowStep` | yes |  |
| `callbacks` | array of `WorkflowCallback` | yes |  |
| `tips` | `WorkflowTips` | yes | Optional tips for either civitai or the creators involved in this workflow. |
| `cost` | `WorkflowCost` | yes | Get a summary of the actual cost consumed by this workflow. On dry-run requests, this will contain the estimated cost. |
| `nsfwLevel` | `NSFWLevel` (one of `pg`, `pg13`, `r`, `x`, `xxx`, `na`) | no | An optional limit in what content is safe to return |
| `experimental` | boolean, nullable | no | Opts the workflow in to new features or behaviours that are not yet stable. |
| `allowMatureContent` | boolean, nullable | no |  |
| `upgradeMode` | `WorkflowUpgradeMode` (one of `manual`, `automatic`) | yes | Specifies how a workflow should be upgraded when mature content is detected and green or blue buzz was used for payment. |
| `currencies` | array of `BuzzClientAccount` (one of `yellow`, `blue`, `green`, `fakeRed`) | yes |  |
| `forceRefunded` | boolean | yes | Whether this workflow has been force-refunded. Prevents re-charging if the workflow is recovered. |
| `ephemeral` | boolean, nullable | no | Not retained: nothing remains once the workflow reaches a terminal state. |
| `externalId` | string, nullable | no | Client-supplied idempotency key, stored as `"{userId}-{clientValue}"`, so it is unique per user. |
| `lostBlobsRefund` | integer (int32), nullable | no | Net buzz refunded for deliverable blobs lost during a past storage incident. Null = not checked (most workflows), 0 = intact; a value > 0 also prevents re-charging on recovery. |
| `deletedAt` | string (date-time), nullable | no | Soft delete: consumer reads treat the workflow as gone. |
| `downloadPriority` | `Priority` (one of `high`, `normal`, `low`, `idle`) | no | Download lane for resources this workflow needs but the fleet does not hold. Resolved from membership at submission unless the consumer paid to pin it to High. |
| `tier` | `WorkflowTier` (one of `paid`, `free`) | yes | How a workflow is paid for. |
| `fund` | string (uuid), nullable | no |  |

### 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.
