PATCH
/repos/{owner}/{repo}/labels/{name}Update a label
Updates a label in a repository using its current name. Supply any fields you want to change; all body fields are optional, and description can contain at most 100 characters. Set archived to archive or unarchive the label.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
ownerstringrequired
The account owner of the repository; the name is not case sensitive.
repostringrequired
The repository name without the `.git` extension; the name is not case sensitive.
namestringrequired
The current name of the label to update.
Optional label updates; provide the fields you want to change.
new_namestringoptional
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 . For a full list of available emoji and codes, see "[Emoji cheat sheet](https://github.com/ikatyang/emoji-cheat-sheet)."
colorstringoptional
The [hexadecimal color code](http://www.color-hex.com/) for the label, without the leading `#`.
descriptionstringoptional
A short description of the label. Must be 100 characters or fewer.
archivedbooleanoptional
Whether to archive or unarchive the label. Archived labels cannot be added to issues or pull requests. For more information, see "[Archiving labels](https://docs.github.com/issues/organizing-your-work-with-labels/managing-labels)."
200Returns the updated label object, including its identifier, name, description, color, default status, and archive details.
idintegerrequired
Unique identifier for the label.
node_idstringrequired
urlstringrequired
URL for the label
namestringrequired
The name of the label.
descriptionstringrequired
Optional description of the label, such as its purpose.
colorstringrequired
6-character hex code, without the leading #, identifying the color
defaultbooleanrequired
Whether this label comes by default in a new repository.
archived_atstringrequired
Timestamp indicating when the label was archived, or `null` if it has not been archived.
archived_byobjectrequired
The user who archived the label, or `null` if it has not been archived.
Error handling
The owner path parameter and repo path parameter must identify the repository, and the name path parameter must identify the label to update. All body fields are optional, and description must be 100 characters or fewer.