# Update workflow

```http
PATCH /projects/{project_reference}/workflows/{workflow_id}
```

Change the description, version or schedulable flag of a structured workflow, where an omitted field keeps its value; returns the updated workflow source document. Requires project.runs.write.

## Parameters

| Name                 | In    | Required | Description                                                |
| -------------------- | ----- | -------- | ---------------------------------------------------------- |
| `project_reference`  | path  | Yes      | Project slug, UUID, or domain that identifies the project. |
| `workflow_id`        | path  | Yes      |                                                            |
| `source_target_kind` | query |          |                                                            |
| `target_branch_id`   | query |          |                                                            |

## Request body

| Field         | Type        | Required | Description                                           |
| ------------- | ----------- | -------- | ----------------------------------------------------- |
| `description` | string,null |          | Updated workflow description.                         |
| `version`     | string,null |          | Updated workflow version string.                      |
| `schedulable` | boolean     |          | Updated schedulable flag for the workflow definition. |

## Responses

| Status | Description                                                                                                 |
| ------ | ----------------------------------------------------------------------------------------------------------- |
| 200    | Updated workflow document                                                                                   |
| 400    | Bad request                                                                                                 |
| 401    | Unauthorized                                                                                                |
| 403    | Forbidden                                                                                                   |
| 404    | Not found                                                                                                   |
| 409    | Conflict                                                                                                    |
| 500    | Server error                                                                                                |
| 503    | internal: authentication state is temporarily unavailable and the request was not processed; retry shortly. |
