---
title: "Edit a project workflow"
method: PATCH
path: "/user/projects/{id}/workflows/{workflow_id}"
tags: ["user"]
---

# Edit a project workflow

`PATCH /user/projects/{id}/workflows/{workflow_id}`

## Request

- Base URL: `https://demo.gitea.com/api/v1`
- URL: `https://demo.gitea.com/api/v1/user/projects/{id}/workflows/{workflow_id}`
- Auth: one of:
  - HTTP basic
  - API key in query parameter `token`
  - API key in query parameter `access_token`
  - API key in header `Authorization`
  - API key in query parameter `sudo`
  - API key in header `Sudo`
  - API key in header `X-GITEA-OTP`
- TypeScript: <https://skmtc.dev/gitea/apis/gitea-api/docs/user/projects/:id/workflows/:workflow_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `id` integer, required
- `workflow_id` integer, required

## Request body

- EditProjectWorkflowOption: EditProjectWorkflowOption options for editing a project workflow, omitted fields are left unchanged
  - `actions` ProjectWorkflowActions: ProjectWorkflowActions describes what a project workflow does to a matching item
    - `add_label_ids` integer[]
    - `column_id` integer
    - `issue_state` string: "close" or "reopen"
    - `remove_label_ids` integer[]
  - `enabled` boolean
  - `filters` ProjectWorkflowFilters: ProjectWorkflowFilters restricts which items a project workflow runs for
    - `issue_type` string: "issue" or "pull_request", empty matches both
    - `label_ids` integer[]: the item must have all of these labels
    - `source_column_id` integer: only for item_column_changed
    - `target_column_id` integer: only for item_column_changed

## Response `200`

ProjectWorkflow

- ProjectWorkflow: ProjectWorkflow represents a project workflow
  - `actions` ProjectWorkflowActions: ProjectWorkflowActions describes what a project workflow does to a matching item
    - `add_label_ids` integer[]
    - `column_id` integer
    - `issue_state` string: "close" or "reopen"
    - `remove_label_ids` integer[]
  - `created_at` string, date-time
  - `enabled` boolean
  - `event` string: one of item_added_to_project, item_removed_from_project, item_reopened, item_closed, item_column_changed, code_changes_requested, code_review_approved, pull_request_merged
  - `filters` ProjectWorkflowFilters: ProjectWorkflowFilters restricts which items a project workflow runs for
    - `issue_type` string: "issue" or "pull_request", empty matches both
    - `label_ids` integer[]: the item must have all of these labels
    - `source_column_id` integer: only for item_column_changed
    - `target_column_id` integer: only for item_column_changed
  - `id` integer
  - `updated_at` string, date-time

## Other responses

- `default`: APIError is error format response

## Changes

- **2026-10-28** `7ef50c4c527f`: 3 info
  - removed the non-success response with the status `403`
  - removed the non-success response with the status `404`
  - removed the non-success response with the status `422`
- **2026-10-23** `0b4de3172750`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/gitea/apis/gitea-api/changes/user/projects/:id/workflows/:workflow_id/patch.md)

---

[API](https://skmtc.dev/gitea/apis/gitea-api.md) - [All operations](https://skmtc.dev/gitea/apis/gitea-api/llms.txt) - [OpenAPI document](https://skmtc.dev/gitea/apis/gitea-api/revisions/7ef50c4c527f?raw)
