Skip to content

Update an existing label. At least one optional parameter is required.

Deprecated
PUT
/api/v4/projects/{id}/labels

Deprecated in GitLab 12.4. Use PUT /projects/:id/labels/:name instead.

id
required
One of:
string

The ID or URL-encoded path of the project

Media type application/json
object
label_id

The ID of the label to be updated

integer
nullable
name

The name of the label to be updated

string
nullable
new_name

The new name of the label

string
nullable
color

The new color of the label given in 6-digit hex notation with leading ‘#’ sign (e.g. #FFAABB) or one of the allowed CSS color names

string
nullable
description

The new description of label

string
nullable
archived

Whether the label is archived

boolean
nullable
priority

The priority of the label

integer
nullable
Example generated
{
"label_id": 1,
"name": "example",
"new_name": "example",
"color": "example",
"description": "example",
"archived": true,
"priority": 1
}

OK

Media type application/json
object
id
integer format: int64
name
string
description
string
text_color
string
description_html
string
color
string
archived
boolean
open_issues_count
integer
closed_issues_count
integer
open_merge_requests_count
integer
subscribed
boolean
priority
integer
is_project_label
boolean
Example
{
"id": 1,
"name": "bug",
"description": "Bug reported by user",
"text_color": "#FFFFFF",
"description_html": "<p>Bug reported by user</p>",
"color": "#FF0000",
"archived": false,
"open_issues_count": 1,
"closed_issues_count": 0,
"open_merge_requests_count": 1,
"subscribed": false,
"priority": 10
}

Bad Request

Not Found