跳转到内容
Try Gitea Cloud ☁️ for 30 days → Accelerate your Development & Deploys!
Support
This is the documentation of 25.6.2, which is no longer the latest release. See the latest release.

Create a label for an organization

POST
/orgs/{org}/labels
curl --request POST \
--url https://gitea.example.com/api/v1/orgs/example/labels \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "color": "#00aabb", "description": "example", "exclusive": false, "is_archived": false, "name": "example" }'
org
required
string

Name of the organization

Media typeapplication/json

CreateLabelOption options for creating a label

object
color
required
string
Example
#00aabb
description

Description provides additional context about the label’s purpose

string
exclusive
boolean
Example
false
is_archived
boolean
Example
false
name
required
string

Label

Media typeapplication/json

Label a label to an issue or a pr

object
color
string
description

Description provides additional context about the label’s purpose

string
exclusive
boolean
id

ID is the unique identifier for the label

integer format: int64
is_archived
boolean
name

Name is the display name of the label

string
url

URL is the API endpoint for accessing this label

string
Example
{
"color": "00aabb",
"exclusive": false,
"is_archived": false
}

APINotFound is a not found empty response

Media typeapplication/json

APIValidationError is error format response related to input validation

Media typeapplication/json
message
string
url
string