Skip to main content

Set labels for an issue

Removes any previous labels and sets the new labels for an issue.

PUT/repos/{owner}/{repo}/issues/{issue_number}/labels
Source
github-v3-rest.json
Revision
f5f067c1e6f6
Active snapshot
85e53e3d0d65

Request

Path Parameters
owner string
required
repo string
required
issue_number integer
required

issue_number parameter

Body Params
optional
application/json

Responses

application/json array[Label object]

Response

items Label object

Color-coded labels help you categorize and filter your issues (just like labels in Gmail).

color string
required

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

Example: FFFFFF

default boolean
required

Example: true

description string
requirednullable

Example: Something isn't working

id integer<int64>
required

Example: 208045946

name string
required

The name of the label.

Example: bug

node_id string
required

Example: MDU6TGFiZWwyMDgwNDU5NDY=

url string<uri>
required

URL for the label

Example: https://api.github.com/repositories/42/labels/bug

application/json Basic Error object

Gone

documentation_url string
optional
message string
optional
status string
optional
url string
optional
application/json Validation Error object

Validation failed

documentation_url string
required
errors array[object]
optional
items object
code string
required
field string
optional
index integer
optional
message string
optional
resource string
optional
value
optional
message string
required