← All tags

Issues API Reference

Interact with GitHub Issues.

55 endpoints tagged issues, each listing its parameters and possible responses. Search or scroll the index below to jump to a specific endpoint.

No endpoints match your search.

List issues assigned to the authenticated user

GET /issues

List issues assigned to the authenticated user across all visible repositories including owned repositories, member

Parameters

NameInRequiredDescription
filterquerynoIndicates which sorts of issues to return. assigned means issues assigned to you. created means issues created by you. mentioned means issues mentioning you. subscribed means issues you're subscribed to updates for. all or repos means all issues you can see, regardless of participation or creation.
statequerynoIndicates the state of the issues to return.
labelsquerynoA list of comma separated label names. Example: bug,ui,@high
sortquerynoWhat to sort results by.
directionquerynoThe direction to sort the results by.
sincequerynoOnly show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
collabqueryno
orgsqueryno
ownedqueryno
pullsqueryno
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
422Validation failed, or the endpoint has been spammed.yes
304Not modifiedno
404Resource not foundyes

List organization issues assigned to the authenticated user

GET /orgs/{org}/issues

List issues in an organization assigned to the authenticated user.

Parameters

NameInRequiredDescription
orgpathyesThe organization name. The name is not case sensitive.
filterquerynoIndicates which sorts of issues to return. assigned means issues assigned to you. created means issues created by you. mentioned means issues mentioning you. subscribed means issues you're subscribed to updates for. all or repos means all issues you can see, regardless of participation or creation.
statequerynoIndicates the state of the issues to return.
labelsquerynoA list of comma separated label names. Example: bug,ui,@high
typequerynoCan be the name of an issue type.
sortquerynoWhat to sort results by.
directionquerynoThe direction to sort the results by.
sincequerynoOnly show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

List assignees

GET /repos/{owner}/{repo}/assignees

Lists the available assignees for issues in a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Check if a user can be assigned

GET /repos/{owner}/{repo}/assignees/{assignee}

Checks if a user has permission to be assigned to an issue in this repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
assigneepathyes

Responses

StatusDescriptionHas JSON body
204If the assignee can be assigned to issues in the repository, a 204 header with no content is returned.no
404Otherwise a 404 status code is returned.yes

List repository issues

GET /repos/{owner}/{repo}/issues

List issues in a repository. Only open issues will be listed.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
milestonequerynoIf an integer is passed, it should refer to a milestone by its number field. If the string * is passed, issues with any milestone are accepted. If the string none is passed, issues without milestones are returned.
statequerynoIndicates the state of the issues to return.
assigneequerynoCan be the name of a user. Pass in none for issues with no assigned user, and * for issues assigned to any user.
typequerynoCan be the name of an issue type. If the string * is passed, issues with any type are accepted. If the string none is passed, issues without type are returned.
creatorquerynoThe user that created the issue.
mentionedquerynoA user that's mentioned in the issue.
issue_field_valuesquerynoA comma-separated list of issue field filters in field_slug:value format.
labelsquerynoA list of comma separated label names. Example: bug,ui,@high
sortquerynoWhat to sort results by.
directionquerynoThe direction to sort the results by.
sincequerynoOnly show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
422Validation failed, or the endpoint has been spammed.yes
404Resource not foundyes

Create an issue

POST /repos/{owner}/{repo}/issues

Any user with pull access to a repository can create an issue. If issues are disabled in the repository, the API returns a 410 Gone status.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes
400Bad Requestyes
403Forbiddenyes
422Validation failed, or the endpoint has been spammed.yes
503Service unavailableyes
404Resource not foundyes
410Goneyes

List issue comments for a repository

GET /repos/{owner}/{repo}/issues/comments

You can use the REST API to list comments on issues and pull requests for a repository. Every pull request is an issue, but not every issue is a pull request.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
sortquerynoThe property to sort the results by.
directionquerynoEither asc or desc. Ignored without the sort parameter.
sincequerynoOnly show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
422Validation failed, or the endpoint has been spammed.yes
404Resource not foundyes

Get an issue comment

GET /repos/{owner}/{repo}/issues/comments/{comment_id}

You can use the REST API to get comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
comment_idpathyesThe unique identifier of the comment.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Update an issue comment

PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}

You can use the REST API to update comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
comment_idpathyesThe unique identifier of the comment.

Responses

StatusDescriptionHas JSON body
200Responseyes
422Validation failed, or the endpoint has been spammed.yes

Delete an issue comment

DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}

You can use the REST API to delete comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
comment_idpathyesThe unique identifier of the comment.

Responses

StatusDescriptionHas JSON body
204Responseno

Pin an issue comment

PUT /repos/{owner}/{repo}/issues/comments/{comment_id}/pin

You can use the REST API to pin comments on issues.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
comment_idpathyesThe unique identifier of the comment.

Responses

StatusDescriptionHas JSON body
200Responseyes
401Requires authenticationyes
403Forbiddenyes
404Resource not foundyes
410Goneyes
422Validation failed, or the endpoint has been spammed.yes

Unpin an issue comment

DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/pin

You can use the REST API to unpin comments on issues.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
comment_idpathyesThe unique identifier of the comment.

Responses

StatusDescriptionHas JSON body
204Responseno
401Requires authenticationyes
403Forbiddenyes
404Resource not foundyes
410Goneyes
503Service unavailableyes

List issue events for a repository

GET /repos/{owner}/{repo}/issues/events

Lists events for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
422Validation failed, or the endpoint has been spammed.yes

Get an issue event

GET /repos/{owner}/{repo}/issues/events/{event_id}

Gets a single event by the event id.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
event_idpathyes

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
410Goneyes
403Forbiddenyes

Get an issue

GET /repos/{owner}/{repo}/issues/{issue_number}

The API returns a 301 Moved Permanently status if the issue was

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
404Resource not foundyes
410Goneyes
304Not modifiedno

Update an issue

PATCH /repos/{owner}/{repo}/issues/{issue_number}

Issue owners and users with push access or Triage role can edit an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
200Responseyes
422Validation failed, or the endpoint has been spammed.yes
503Service unavailableyes
403Forbiddenyes
301Moved permanentlyyes
404Resource not foundyes
410Goneyes

Add assignees to an issue

POST /repos/{owner}/{repo}/issues/{issue_number}/assignees

Adds up to 10 assignees to an issue. Users already assigned to an issue are not replaced.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
201Responseyes

Remove assignees from an issue

DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees

Removes one or more assignees from an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
200Responseyes

Check if a user can be assigned to a issue

GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}

Checks if a user has permission to be assigned to a specific issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
assigneepathyes

Responses

StatusDescriptionHas JSON body
204Response if assignee can be assigned to issue_numberno
404Response if assignee can not be assigned to issue_numberyes

List issue comments

GET /repos/{owner}/{repo}/issues/{issue_number}/comments

You can use the REST API to list comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
sincequerynoOnly show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
410Goneyes

Create an issue comment

POST /repos/{owner}/{repo}/issues/{issue_number}/comments

You can use the REST API to create comments on issues and pull requests. Every pull request is an issue, but not every issue is a pull request.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
201Responseyes
403Forbiddenyes
410Goneyes
422Validation failed, or the endpoint has been spammed.yes
404Resource not foundyes

List dependencies an issue is blocked by

GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by

You can use the REST API to list the dependencies an issue is blocked by.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
404Resource not foundyes
410Goneyes

Add a dependency an issue is blocked by

POST /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by

You can use the REST API to add a 'blocked by' relationship to an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
201Responseyes
301Moved permanentlyyes
403Forbiddenyes
410Goneyes
422Validation failed, or the endpoint has been spammed.yes
404Resource not foundyes

Remove dependency an issue is blocked by

DELETE /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocked_by/{issue_id}

You can use the REST API to remove a dependency that an issue is blocked by.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
issue_idpathyesThe id of the blocking issue to remove as a dependency

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
400Bad Requestyes
401Requires authenticationyes
403Forbiddenyes
404Resource not foundyes
410Goneyes

List dependencies an issue is blocking

GET /repos/{owner}/{repo}/issues/{issue_number}/dependencies/blocking

You can use the REST API to list the dependencies an issue is blocking.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
404Resource not foundyes
410Goneyes

List issue events

GET /repos/{owner}/{repo}/issues/{issue_number}/events

Lists all events for an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
410Goneyes

List issue field values for an issue

GET /repos/{owner}/{repo}/issues/{issue_number}/issue-field-values

Lists all issue field values for an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
404Resource not foundyes
410Goneyes

Add issue field values to an issue

POST /repos/{owner}/{repo}/issues/{issue_number}/issue-field-values

Add custom field values to an issue. You can set values for organization-level issue fields that have been defined for the repository's organization.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
200Responseyes
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes
503Service unavailableyes

Set issue field values for an issue

PUT /repos/{owner}/{repo}/issues/{issue_number}/issue-field-values

Set custom field values for an issue, replacing any existing values. You can set values for organization-level issue fields that have been defined for the repository's organization.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
200Responseyes
400Bad Requestyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes
503Service unavailableyes

Delete an issue field value from an issue

DELETE /repos/{owner}/{repo}/issues/{issue_number}/issue-field-values/{issue_field_id}

Remove a specific custom field value from an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
issue_field_idpathyesThe unique identifier of the issue field.

Responses

StatusDescriptionHas JSON body
204Issue field value deleted successfullyno
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes
503Service unavailableyes

List labels for an issue

GET /repos/{owner}/{repo}/issues/{issue_number}/labels

Lists all labels for an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
404Resource not foundyes
410Goneyes

Add labels to an issue

POST /repos/{owner}/{repo}/issues/{issue_number}/labels

Adds labels to an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
404Resource not foundyes
410Goneyes
422Validation failed, or the endpoint has been spammed.yes

Set labels for an issue

PUT /repos/{owner}/{repo}/issues/{issue_number}/labels

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

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
404Resource not foundyes
410Goneyes
422Validation failed, or the endpoint has been spammed.yes

Remove all labels from an issue

DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels

Removes all labels from an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
204Responseno
301Moved permanentlyyes
404Resource not foundyes
410Goneyes

Remove a label from an issue

DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}

Removes the specified label from the issue, and returns the remaining labels on the issue. This endpoint returns a 404 Not Found status if the label does not exist.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
namepathyes

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
404Resource not foundyes
410Goneyes

Lock an issue

PUT /repos/{owner}/{repo}/issues/{issue_number}/lock

Users with push access can lock an issue or pull request's conversation.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
204Responseno
403Forbiddenyes
410Goneyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Unlock an issue

DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock

Users with push access can unlock an issue's conversation.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
204Responseno
403Forbiddenyes
404Resource not foundyes

Get parent issue

GET /repos/{owner}/{repo}/issues/{issue_number}/parent

You can use the REST API to get the parent issue of a sub-issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
200Responseyes
301Moved permanentlyyes
404Resource not foundyes
410Goneyes

Remove sub-issue

DELETE /repos/{owner}/{repo}/issues/{issue_number}/sub_issue

You can use the REST API to remove a sub-issue from an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
200Responseyes
400Bad Requestyes
404Resource not foundyes

List sub-issues

GET /repos/{owner}/{repo}/issues/{issue_number}/sub_issues

You can use the REST API to list the sub-issues on an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
410Goneyes

Add sub-issue

POST /repos/{owner}/{repo}/issues/{issue_number}/sub_issues

You can use the REST API to add sub-issues to issues.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
201Responseyes
403Forbiddenyes
410Goneyes
422Validation failed, or the endpoint has been spammed.yes
404Resource not foundyes

Reprioritize sub-issue

PATCH /repos/{owner}/{repo}/issues/{issue_number}/sub_issues/priority

You can use the REST API to reprioritize a sub-issue to a different position in the parent list.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.

Responses

StatusDescriptionHas JSON body
200Responseyes
403Forbiddenyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes
503Service unavailableyes

List timeline events for an issue

GET /repos/{owner}/{repo}/issues/{issue_number}/timeline

List all timeline events for an issue.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
issue_numberpathyesThe number that identifies the issue.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
400Bad Requestyes
410Goneyes

List labels for a repository

GET /repos/{owner}/{repo}/labels

Lists all labels for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Create a label

POST /repos/{owner}/{repo}/labels

Creates a label for the specified repository with the given name and color. The name and color parameters are required. The color must be a valid hexadecimal color code.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes
422Validation failed, or the endpoint has been spammed.yes
404Resource not foundyes

Get a label

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

Gets a label using the given name.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
namepathyes

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Update a label

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

Updates a label using the given label name.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
namepathyes

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete a label

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

Deletes a label using the given label name.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
namepathyes

Responses

StatusDescriptionHas JSON body
204Responseno

List milestones

GET /repos/{owner}/{repo}/milestones

Lists milestones for a repository.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
statequerynoThe state of the milestone. Either open, closed, or all.
sortquerynoWhat to sort results by. Either due_on or completeness.
directionquerynoThe direction of the sort. Either asc or desc.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Create a milestone

POST /repos/{owner}/{repo}/milestones

Creates a milestone.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.

Responses

StatusDescriptionHas JSON body
201Responseyes
404Resource not foundyes
422Validation failed, or the endpoint has been spammed.yes

Get a milestone

GET /repos/{owner}/{repo}/milestones/{milestone_number}

Gets a milestone using the given milestone number.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
milestone_numberpathyesThe number that identifies the milestone.

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes

Update a milestone

PATCH /repos/{owner}/{repo}/milestones/{milestone_number}

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
milestone_numberpathyesThe number that identifies the milestone.

Responses

StatusDescriptionHas JSON body
200Responseyes

Delete a milestone

DELETE /repos/{owner}/{repo}/milestones/{milestone_number}

Deletes a milestone using the given milestone number.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
milestone_numberpathyesThe number that identifies the milestone.

Responses

StatusDescriptionHas JSON body
204Responseno
404Resource not foundyes

List labels for issues in a milestone

GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels

Lists labels for issues in a milestone.

Parameters

NameInRequiredDescription
ownerpathyesThe account owner of the repository. The name is not case sensitive.
repopathyesThe name of the repository without the .git extension. The name is not case sensitive.
milestone_numberpathyesThe number that identifies the milestone.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes

List user account issues assigned to the authenticated user

GET /user/issues

List issues across owned and member repositories assigned to the authenticated user.

Parameters

NameInRequiredDescription
filterquerynoIndicates which sorts of issues to return. assigned means issues assigned to you. created means issues created by you. mentioned means issues mentioning you. subscribed means issues you're subscribed to updates for. all or repos means all issues you can see, regardless of participation or creation.
statequerynoIndicates the state of the issues to return.
labelsquerynoA list of comma separated label names. Example: bug,ui,@high
sortquerynoWhat to sort results by.
directionquerynoThe direction to sort the results by.
sincequerynoOnly show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_pagequerynoThe number of results per page (max 100). For more information, see "Using pagination in the REST API."
pagequerynoThe page number of the results to fetch. For more information, see "Using pagination in the REST API."

Responses

StatusDescriptionHas JSON body
200Responseyes
404Resource not foundyes
304Not modifiedno