Skip to main content
PATCH
/
repos
/
{owner}
/
{repo}
/
labels
/
{id}
Update a label
curl --request PATCH \
  --url https://gogs.example.com/api/v1/repos/{owner}/{repo}/labels/{id} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "color": "<string>"
}
'
{
  "id": 123,
  "name": "<string>",
  "color": "<string>",
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

Personal access token. Use format: token {YOUR_ACCESS_TOKEN}

Path Parameters

owner
string
required

Repository owner

repo
string
required

Repository name

id
string
required

Label ID

Body

application/json
name
string
color
string

Response

Success

id
integer
name
string
color
string
url
string