Skip to content
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.

Update a label

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

Owner of the repo

repo
required
string

Name of the repo

id
required
string

Id of the label to edit, or its name when not numeric

Media typeapplication/json
EditLabelOption

Options for editing a label

object
color
string

Example

#00aabb
description

Description provides additional context about the label’s purpose

string
exclusive
boolean

Example

false
is_archived
boolean

Example

false
name

Name is the new display name for the label

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 format: uri

Example

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

APIError is error format response

message
string
url
string