v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
issues

Update a label

Updates a label using the given label name.

patch/repos/{owner}/{repo}/labels/{name}

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

namestring required

Request body

new_namestring

The new name of the label. Emoji can be added to label names, using either native emoji or colon-style markup. For example, typing :strawberry: will render the emoji :strawberry:. For a full list of available emoji and codes, see "Emoji cheat sheet."

colorstring

The hexadecimal color code for the label, without the leading #.

descriptionstring

A short description of the label. Must be 100 characters or fewer.

Response

Response

idinteger required

Unique identifier for the label.

node_idstring required
urlstring uri required

URL for the label

namestring required

The name of the label.

descriptionstring nullable required

Optional description of the label, such as its purpose.

colorstring required

6-character hex code, without the leading #, identifying the color

defaultboolean required

Whether this label comes by default in a new repository.

Example response

{
  "id": 208045946,
  "node_id": "MDU6TGFiZWwyMDgwNDU5NDY=",
  "url": "https://api.github.com/repositories/42/labels/bug",
  "name": "bug",
  "description": "Something isn't working",
  "color": "FFFFFF",
  "default": true
}