跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
This is the documentation of the next version, still under development. See the latest release.

Create a project workflow

POST
/repos/{owner}/{repo}/projects/{id}/workflows
curl --request POST \
--url https://gitea.com/api/v1/repos/example/example/projects/1/workflows \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "actions": { "add_label_ids": [ 1 ], "column_id": 1, "issue_state": "example", "remove_label_ids": [ 1 ] }, "enabled": true, "event": "example", "filters": { "issue_type": "example", "label_ids": [ 1 ], "source_column_id": 1, "target_column_id": 1 } }'
owner
required
string

Owner of the repo

repo
required
string

Name of the repo

id
required
integer format: int64

Id of the project

Media typeapplication/json
CreateProjectWorkflowOption

Options for creating a project workflow

object
actions
ProjectWorkflowActions

Describes what a project workflow does to a matching item

object
add_label_ids
Array<integer>
column_id
integer format: int64
issue_state

“close” or “reopen”

string
remove_label_ids
Array<integer>
enabled

Defaults to true

boolean
event
required
string
filters
ProjectWorkflowFilters

Restricts which items a project workflow runs for

object
issue_type

“issue” or “pull_request”, empty matches both

string
label_ids

The item must have all of these labels

Array<integer>
source_column_id

Only for item_column_changed

integer format: int64
target_column_id

Only for item_column_changed

integer format: int64

Example generated

{
"actions": {
"add_label_ids": [
1
],
"column_id": 1,
"issue_state": "example",
"remove_label_ids": [
1
]
},
"enabled": true,
"event": "example",
"filters": {
"issue_type": "example",
"label_ids": [
1
],
"source_column_id": 1,
"target_column_id": 1
}
}

ProjectWorkflow

Media typeapplication/json
ProjectWorkflow

Represents a project workflow

object
actions
ProjectWorkflowActions

Describes what a project workflow does to a matching item

object
add_label_ids
Array<integer>
column_id
integer format: int64
issue_state

“close” or “reopen”

string
remove_label_ids
Array<integer>
created_at
string format: date-time
enabled
boolean
event

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

string
filters
ProjectWorkflowFilters

Restricts which items a project workflow runs for

object
issue_type

“issue” or “pull_request”, empty matches both

string
label_ids

The item must have all of these labels

Array<integer>
source_column_id

Only for item_column_changed

integer format: int64
target_column_id

Only for item_column_changed

integer format: int64
id
integer format: int64
updated_at
string format: date-time

Example generated

{
"actions": {
"add_label_ids": [
1
],
"column_id": 1,
"issue_state": "example",
"remove_label_ids": [
1
]
},
"created_at": "2026-04-15T12:00:00Z",
"enabled": true,
"event": "example",
"filters": {
"issue_type": "example",
"label_ids": [
1
],
"source_column_id": 1,
"target_column_id": 1
},
"id": 1,
"updated_at": "2026-04-15T12:00:00Z"
}

APIForbiddenError is a forbidden error response

message
string
url
string

APINotFound is a not found empty response

APIValidationError is error format response related to input validation

message
string
url
string

APIRepoArchivedError is an error that is raised when an archived repo should be modified

message
string
url
string