Create a project workflow
const url = 'https://gitea.com/api/v1/repos/example/example/projects/1/workflows';const options = { method: 'POST', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"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}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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 } }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Owner of the repo
Name of the repo
Id of the project
Request Body
Section titled “Request Body”Options for creating a project workflow
object
Describes what a project workflow does to a matching item
object
“close” or “reopen”
Defaults to true
Restricts which items a project workflow runs for
object
“issue” or “pull_request”, empty matches both
The item must have all of these labels
Only for item_column_changed
Only for item_column_changed
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 }}Responses
Section titled “Responses”ProjectWorkflow
Represents a project workflow
object
Describes what a project workflow does to a matching item
object
“close” or “reopen”
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
Restricts which items a project workflow runs for
object
“issue” or “pull_request”, empty matches both
The item must have all of these labels
Only for item_column_changed
Only for item_column_changed
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"}default
Section titled “default”APIError is error format response