Update a label
PATCH
/orgs/{org}/labels/{id}
const url = 'https://gitea.example.com/api/v1/orgs/example/labels/1';const options = { method: 'PATCH', headers: {Authorization: 'Basic <credentials>', 'Content-Type': 'application/json'}, body: '{"color":"#00aabb","description":"example","exclusive":false,"is_archived":false,"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://gitea.example.com/api/v1/orgs/example/labels/1 \ --header 'Authorization: Basic <credentials>' \ --header 'Content-Type: application/json' \ --data '{ "color": "#00aabb", "description": "example", "exclusive": false, "is_archived": false, "name": "example" }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”org
required
string
Name of the organization
id
required
integer format: int64
Id of the label to edit
Request Body
Section titled “Request Body”Media typeapplication/json
EditLabelOption options for editing a label
object
color
string
Example
#00aabbdescription
string
exclusive
boolean
Example
falseis_archived
boolean
Example
falsename
string
Responses
Section titled “Responses”Label
Media typeapplication/json
Label a label to an issue or a pr
object
color
string
description
string
exclusive
boolean
id
integer format: int64
is_archived
boolean
name
string
url
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
Headers
Section titled “Headers”message
string
url
string