Sample - GitHub REST API
DELETE/repos/{owner}/{repo}/issues/{issue_number}/labels/{name}

Remove a label from an issue

Removes a specified label from an issue and returns the labels that remain attached to it. Supply owner, repo, issue_number, and name to identify the repository, issue, and label to remove. A 200 response returns the updated label collection.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

4 parameters
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.
issue_numberintegerrequired
The integer that identifies the issue.
namestringrequired
The name of the label to remove from the issue.

4 status codes
200Returns an array of the labels remaining on the issue after removal.
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.
301Returns a basic error response when the resource has moved permanently.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
404Returned when the repository, issue, or label does not exist.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
410Returned when the requested resource is no longer available.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 404 is returned when the repository, issue, or label cannot be found. A 410 is returned when the requested resource is no longer available. issue_number must identify an issue in the repository, and name must identify the label to remove.