Use the REST API to manage issues and pull requests.
Note
Most endpoints use Authorization: Bearer <YOUR-TOKEN> and Accept: application/vnd.github+json headers, plus X-GitHub-Api-Version: 2026-03-10. Curl examples below omit these standard headers for brevity.
GET /issues
List issues assigned to the authenticated user across all visible repositories including owned repositories, member
repositories, and organization repositories. You can use the filter query parameter to fetch issues that are not
necessarily assigned to you.
Note
GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request key. Be aware that the id of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will include body_text.
application/vnd.github.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
accept (string)application/vnd.github+json is recommended.filter (string)
Indicates 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.
Default: assigned
Can be one of: assigned, created, mentioned, subscribed, repos, all
state (string)
Indicates the state of the issues to return.
Default: open
Can be one of: open, closed, all
labels (string)
A list of comma separated label names. Example: bug,ui,@high
sort (string)
What to sort results by.
Default: created
Can be one of: created, updated, comments
direction (string)
The direction to sort the results by.
Default: desc
Can be one of: asc, desc
since (string)
Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
collab (boolean)
orgs (boolean)
owned (boolean)
pulls (boolean)
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
304 - Not modified
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X GET \
https://api.github.com/issues
Response schema (Status: 200):
Array of Issue:
id: required, integer, format: int64node_id: required, stringurl: required, string, format: urirepository_url: required, string, format: urilabels_url: required, stringcomments_url: required, string, format: urievents_url: required, string, format: urihtml_url: required, string, format: urinumber: required, integerstate: required, stringstate_reason: string or null, enum: completed, reopened, not_planned, duplicate, nulltitle: required, stringbody: string or nulluser: required, any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringlabels: required, array of items:
id: integer, format: int64node_id: stringurl: string, format: uriname: stringdescription: string or nullcolor: string or nulldefault: booleanarchived_by: all of:
assignees: array of Simple User (see above)milestone: required, any of:
url: required, string, format: urihtml_url: required, string, format: urilabels_url: required, string, format: uriid: required, integernode_id: required, stringnumber: required, integerstate: required, string, enum: open, closed, default: "open"title: required, stringdescription: required, string or nullcreator: required, any of:
open_issues: required, integerclosed_issues: required, integercreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timeclosed_at: required, string or null, format: date-timedue_on: required, string or null, format: date-timelocked: required, booleanactive_lock_reason: string or nullcomments: required, integerpull_request: object:
merged_at: string or null, format: date-timediff_url: required, string or null, format: urihtml_url: required, string or null, format: uripatch_url: required, string or null, format: uriurl: required, string or null, format: uriclosed_at: required, string or null, format: date-timecreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timedraft: booleanclosed_by: any of:
body_html: stringbody_text: stringtimeline_url: string, format: uritype: Issue Type:
id: required, integernode_id: required, stringname: required, stringdescription: required, string or nullcolor: string or null, enum: gray, blue, green, yellow, orange, red, pink, purple, nullcreated_at: string, format: date-timeupdated_at: string, format: date-timeis_enabled: booleanrepository: Repository:
id: required, integer, format: int64node_id: required, stringname: required, stringfull_name: required, stringlicense: required, any of:
key: required, stringname: required, stringurl: required, string or null, format: urispdx_id: required, string or nullnode_id: required, stringhtml_url: string, format: uriforks: required, integerpermissions: object:
admin: required, booleanpull: required, booleantriage: booleanpush: required, booleanmaintain: booleanowner: required, Simple User (see above)private: required, boolean, default: falsehtml_url: required, string, format: uridescription: required, string or nullfork: required, booleanurl: required, string, format: uriarchive_url: required, stringassignees_url: required, stringblobs_url: required, stringbranches_url: required, stringcollaborators_url: required, stringcomments_url: required, stringcommits_url: required, stringcompare_url: required, stringcontents_url: required, stringcontributors_url: required, string, format: urideployments_url: required, string, format: uridownloads_url: required, string, format: urievents_url: required, string, format: uriforks_url: required, string, format: urigit_commits_url: required, stringgit_refs_url: required, stringgit_tags_url: required, stringgit_url: required, stringissue_comment_url: required, stringissue_events_url: required, stringissues_url: required, stringkeys_url: required, stringlabels_url: required, stringlanguages_url: required, string, format: urimerges_url: required, string, format: urimilestones_url: required, stringnotifications_url: required, stringpulls_url: required, stringreleases_url: required, stringssh_url: required, stringstargazers_url: required, string, format: uristatuses_url: required, stringsubscribers_url: required, string, format: urisubscription_url: required, string, format: uritags_url: required, string, format: uriteams_url: required, string, format: uritrees_url: required, stringclone_url: required, stringmirror_url: required, string or null, format: urihooks_url: required, string, format: urisvn_url: required, string, format: urihomepage: required, string or null, format: urilanguage: required, string or nullforks_count: required, integerstargazers_count: required, integerwatchers_count: required, integersize: required, integerdefault_branch: required, stringopen_issues_count: required, integeris_template: boolean, default: falsetopics: array of stringhas_issues: required, boolean, default: truehas_projects: required, boolean, default: truehas_wiki: required, boolean, default: truehas_pages: required, booleanhas_discussions: boolean, default: falsehas_pull_requests: boolean, default: truepull_request_creation_policy: string, enum: all, collaborators_onlyarchived: required, boolean, default: falsedisabled: required, booleanvisibility: string, default: "public"pushed_at: required, string or null, format: date-timecreated_at: required, string or null, format: date-timeupdated_at: required, string or null, format: date-timeallow_rebase_merge: boolean, default: truetemp_clone_token: stringallow_squash_merge: boolean, default: trueallow_auto_merge: boolean, default: falsedelete_branch_on_merge: boolean, default: falseallow_update_branch: boolean, default: falsesquash_merge_commit_title: string, enum: PR_TITLE, COMMIT_OR_PR_TITLEsquash_merge_commit_message: string, enum: PR_BODY, COMMIT_MESSAGES, BLANKmerge_commit_title: string, enum: PR_TITLE, MERGE_MESSAGEmerge_commit_message: string, enum: PR_BODY, PR_TITLE, BLANKallow_merge_commit: boolean, default: trueallow_forking: booleanweb_commit_signoff_required: boolean, default: falseopen_issues: required, integerwatchers: required, integerstarred_at: stringanonymous_access_enabled: booleancode_search_index_status: object:
lexical_search_ok: booleanlexical_commit_sha: stringperformed_via_github_app: any of:
id: required, integerslug: stringnode_id: required, stringclient_id: stringowner: required, one of:
description: string or nullhtml_url: required, string, format: uriwebsite_url: string or null, format: uriid: required, integernode_id: required, stringname: required, stringslug: required, stringcreated_at: required, string or null, format: date-timeupdated_at: required, string or null, format: date-timeavatar_url: required, string, format: uriname: required, stringdescription: required, string or nullexternal_url: required, string, format: urihtml_url: required, string, format: uricreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timepermissions: required, object, additional properties: string:
issues: stringchecks: stringmetadata: stringcontents: stringdeployments: stringevents: required, array of stringinstallations_count: integerauthor_association: string, enum: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNERreactions: Reaction Rollup:
url: required, string, format: uritotal_count: required, integer+1: required, integer-1: required, integerlaugh: required, integerconfused: required, integerheart: required, integerhooray: required, integereyes: required, integerrocket: required, integersub_issues_summary: Sub-issues Summary:
total: required, integercompleted: required, integerpercent_completed: required, integerparent_issue_url: string or null, format: uripinned_comment: any of:
id: required, integer, format: int64node_id: required, stringurl: required, string, format: uribody: stringbody_text: stringbody_html: stringhtml_url: required, string, format: uriuser: required, any of:
created_at: required, string, format: date-timeupdated_at: required, string, format: date-timeissue_url: required, string, format: uriauthor_association: string, enum: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNERperformed_via_github_app: any of:
reactions: Reaction Rollup (see above)pin: any of:
pinned_at: required, string, format: date-timepinned_by: required, any of:
minimized: any of:
reason: required, string or nullissue_dependencies_summary: Issue Dependencies Summary:
blocked_by: required, integerblocking: required, integertotal_blocked_by: required, integertotal_blocking: required, integerissue_field_values: array of Issue Field Value:
issue_field_id: required, integer, format: int64issue_field_name: stringnode_id: required, stringdata_type: required, string, enum: text, single_select, multi_select, number, datevalue: required, any of:
single_select_option: object or null:
id: required, integer, format: int64name: required, stringcolor: required, stringmulti_select_options: array of objects or null:
id: required, integer, format: int64name: required, stringcolor: required, stringGET /orgs/{org}/issues
List issues in an organization assigned to the authenticated user.
Note
GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request key. Be aware that the id of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will include body_text.
application/vnd.github.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
accept (string)application/vnd.github+json is recommended.org (string) (required)
The organization name. The name is not case sensitive.
filter (string)
Indicates 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.
Default: assigned
Can be one of: assigned, created, mentioned, subscribed, repos, all
state (string)
Indicates the state of the issues to return.
Default: open
Can be one of: open, closed, all
labels (string)
A list of comma separated label names. Example: bug,ui,@high
type (string)
Can be the name of an issue type.
sort (string)
What to sort results by.
Default: created
Can be one of: created, updated, comments
direction (string)
The direction to sort the results by.
Default: desc
Can be one of: asc, desc
since (string)
Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/orgs/ORG/issues
Response schema (Status: 200):
Same response schema as List issues assigned to the authenticated user.
GET /repos/{owner}/{repo}/issues
List issues in a repository. Only open issues will be listed.
Note
GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request key. Be aware that the id of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will include body_text.
application/vnd.github.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
milestone (string)
If 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.
state (string)
Indicates the state of the issues to return.
Default: open
Can be one of: open, closed, all
assignee (string)
Can be the name of a user. Pass in none for issues with no assigned user, and * for issues assigned to any user.
type (string)
Can 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.
creator (string)
The user that created the issue.
mentioned (string)
A user that's mentioned in the issue.
issue_field_values (string)
A comma-separated list of issue field filters in field_slug:value format.
Only issues matching all specified field values are returned.
Requires issue fields to be enabled for the repository. Issue fields are
not available for user-owned repositories, and field availability for
organization-owned public repositories depends on the organization's
visibility settings. For example, priority:Urgent,severity:High filters
issues where the priority field is Urgent AND the severity field is
High.
labels (string)
A list of comma separated label names. Example: bug,ui,@high
sort (string)
What to sort results by.
Default: created
Can be one of: created, updated, comments
direction (string)
The direction to sort the results by.
Default: desc
Can be one of: asc, desc
since (string)
Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
301 - Moved permanently
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/issues
Response schema (Status: 200):
Same response schema as List issues assigned to the authenticated user.
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.
This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see "Rate limits for the API"
and "Best practices for using the REST API."
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will include body_text.
application/vnd.github.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
title (string or integer) (required)
The title of the issue.
body (string)
The contents of the issue.
milestone (null or string or integer)
The number of the milestone to associate this issue with. NOTE: Only users with push access can set the milestone for new issues. The milestone is silently dropped otherwise.
labels (array)
Labels to associate with this issue. NOTE: Only users with push access can set labels for new issues. Labels are silently dropped otherwise.
assignees (array of strings)
Logins for Users to assign to this issue. NOTE: Only users with push access can set assignees for new issues. Assignees are silently dropped otherwise.
issue_field_values (array of objects)
An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Issue fields are only available for organization-owned repositories with the feature enabled. Field values are silently dropped otherwise.
field_id (integer) (required)value (string or number or array) (required)type (string or null)
The name of the issue type to associate with this issue. NOTE: Only users with push access can set the type for new issues. The type is silently dropped otherwise.
parent_issue_id (integer)
The id of the parent issue to add this issue to as a sub-issue. NOTE: Only users with triage access to both the parent issue's repository and this repository can set the parent issue.
201 - Created
400 - Bad Request
403 - Forbidden
404 - Resource not found
410 - Gone
422 - Validation failed, or the endpoint has been spammed.
503 - Service unavailable
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/issues \
-d '{
"title": "Found a bug",
"body": "I'\''m having a problem with this.",
"assignees": [
"octocat"
],
"milestone": 1,
"labels": [
"bug"
]
}'
Response schema (Status: 201):
id: required, integer, format: int64node_id: required, stringurl: required, string, format: urirepository_url: required, string, format: urilabels_url: required, stringcomments_url: required, string, format: urievents_url: required, string, format: urihtml_url: required, string, format: urinumber: required, integerstate: required, stringstate_reason: string or null, enum: completed, reopened, not_planned, duplicate, nulltitle: required, stringbody: string or nulluser: required, any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringlabels: required, array of items:
id: integer, format: int64node_id: stringurl: string, format: uriname: stringdescription: string or nullcolor: string or nulldefault: booleanarchived_by: all of:
assignees: array of Simple User (see above)milestone: required, any of:
url: required, string, format: urihtml_url: required, string, format: urilabels_url: required, string, format: uriid: required, integernode_id: required, stringnumber: required, integerstate: required, string, enum: open, closed, default: "open"title: required, stringdescription: required, string or nullcreator: required, any of:
open_issues: required, integerclosed_issues: required, integercreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timeclosed_at: required, string or null, format: date-timedue_on: required, string or null, format: date-timelocked: required, booleanactive_lock_reason: string or nullcomments: required, integerpull_request: object:
merged_at: string or null, format: date-timediff_url: required, string or null, format: urihtml_url: required, string or null, format: uripatch_url: required, string or null, format: uriurl: required, string or null, format: uriclosed_at: required, string or null, format: date-timecreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timedraft: booleanclosed_by: any of:
body_html: stringbody_text: stringtimeline_url: string, format: uritype: Issue Type:
id: required, integernode_id: required, stringname: required, stringdescription: required, string or nullcolor: string or null, enum: gray, blue, green, yellow, orange, red, pink, purple, nullcreated_at: string, format: date-timeupdated_at: string, format: date-timeis_enabled: booleanrepository: Repository:
id: required, integer, format: int64node_id: required, stringname: required, stringfull_name: required, stringlicense: required, any of:
key: required, stringname: required, stringurl: required, string or null, format: urispdx_id: required, string or nullnode_id: required, stringhtml_url: string, format: uriforks: required, integerpermissions: object:
admin: required, booleanpull: required, booleantriage: booleanpush: required, booleanmaintain: booleanowner: required, Simple User (see above)private: required, boolean, default: falsehtml_url: required, string, format: uridescription: required, string or nullfork: required, booleanurl: required, string, format: uriarchive_url: required, stringassignees_url: required, stringblobs_url: required, stringbranches_url: required, stringcollaborators_url: required, stringcomments_url: required, stringcommits_url: required, stringcompare_url: required, stringcontents_url: required, stringcontributors_url: required, string, format: urideployments_url: required, string, format: uridownloads_url: required, string, format: urievents_url: required, string, format: uriforks_url: required, string, format: urigit_commits_url: required, stringgit_refs_url: required, stringgit_tags_url: required, stringgit_url: required, stringissue_comment_url: required, stringissue_events_url: required, stringissues_url: required, stringkeys_url: required, stringlabels_url: required, stringlanguages_url: required, string, format: urimerges_url: required, string, format: urimilestones_url: required, stringnotifications_url: required, stringpulls_url: required, stringreleases_url: required, stringssh_url: required, stringstargazers_url: required, string, format: uristatuses_url: required, stringsubscribers_url: required, string, format: urisubscription_url: required, string, format: uritags_url: required, string, format: uriteams_url: required, string, format: uritrees_url: required, stringclone_url: required, stringmirror_url: required, string or null, format: urihooks_url: required, string, format: urisvn_url: required, string, format: urihomepage: required, string or null, format: urilanguage: required, string or nullforks_count: required, integerstargazers_count: required, integerwatchers_count: required, integersize: required, integerdefault_branch: required, stringopen_issues_count: required, integeris_template: boolean, default: falsetopics: array of stringhas_issues: required, boolean, default: truehas_projects: required, boolean, default: truehas_wiki: required, boolean, default: truehas_pages: required, booleanhas_discussions: boolean, default: falsehas_pull_requests: boolean, default: truepull_request_creation_policy: string, enum: all, collaborators_onlyarchived: required, boolean, default: falsedisabled: required, booleanvisibility: string, default: "public"pushed_at: required, string or null, format: date-timecreated_at: required, string or null, format: date-timeupdated_at: required, string or null, format: date-timeallow_rebase_merge: boolean, default: truetemp_clone_token: stringallow_squash_merge: boolean, default: trueallow_auto_merge: boolean, default: falsedelete_branch_on_merge: boolean, default: falseallow_update_branch: boolean, default: falsesquash_merge_commit_title: string, enum: PR_TITLE, COMMIT_OR_PR_TITLEsquash_merge_commit_message: string, enum: PR_BODY, COMMIT_MESSAGES, BLANKmerge_commit_title: string, enum: PR_TITLE, MERGE_MESSAGEmerge_commit_message: string, enum: PR_BODY, PR_TITLE, BLANKallow_merge_commit: boolean, default: trueallow_forking: booleanweb_commit_signoff_required: boolean, default: falseopen_issues: required, integerwatchers: required, integerstarred_at: stringanonymous_access_enabled: booleancode_search_index_status: object:
lexical_search_ok: booleanlexical_commit_sha: stringperformed_via_github_app: any of:
id: required, integerslug: stringnode_id: required, stringclient_id: stringowner: required, one of:
description: string or nullhtml_url: required, string, format: uriwebsite_url: string or null, format: uriid: required, integernode_id: required, stringname: required, stringslug: required, stringcreated_at: required, string or null, format: date-timeupdated_at: required, string or null, format: date-timeavatar_url: required, string, format: uriname: required, stringdescription: required, string or nullexternal_url: required, string, format: urihtml_url: required, string, format: uricreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timepermissions: required, object, additional properties: string:
issues: stringchecks: stringmetadata: stringcontents: stringdeployments: stringevents: required, array of stringinstallations_count: integerauthor_association: string, enum: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNERreactions: Reaction Rollup:
url: required, string, format: uritotal_count: required, integer+1: required, integer-1: required, integerlaugh: required, integerconfused: required, integerheart: required, integerhooray: required, integereyes: required, integerrocket: required, integersub_issues_summary: Sub-issues Summary:
total: required, integercompleted: required, integerpercent_completed: required, integerparent_issue_url: string or null, format: uripinned_comment: any of:
id: required, integer, format: int64node_id: required, stringurl: required, string, format: uribody: stringbody_text: stringbody_html: stringhtml_url: required, string, format: uriuser: required, any of:
created_at: required, string, format: date-timeupdated_at: required, string, format: date-timeissue_url: required, string, format: uriauthor_association: string, enum: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNERperformed_via_github_app: any of:
reactions: Reaction Rollup (see above)pin: any of:
pinned_at: required, string, format: date-timepinned_by: required, any of:
minimized: any of:
reason: required, string or nullissue_dependencies_summary: Issue Dependencies Summary:
blocked_by: required, integerblocking: required, integertotal_blocked_by: required, integertotal_blocking: required, integerissue_field_values: array of Issue Field Value:
issue_field_id: required, integer, format: int64issue_field_name: stringnode_id: required, stringdata_type: required, string, enum: text, single_select, multi_select, number, datevalue: required, any of:
single_select_option: object or null:
id: required, integer, format: int64name: required, stringcolor: required, stringmulti_select_options: array of objects or null:
id: required, integer, format: int64name: required, stringcolor: required, stringGET /repos/{owner}/{repo}/issues/{issue_number}
The API returns a 301 Moved Permanently status if the issue was
transferred to another repository. If
the issue was transferred to or deleted from a repository where the authenticated user lacks read access, the API
returns a 404 Not Found status. If the issue was deleted from a repository where the authenticated user has read
access, the API returns a 410 Gone status. To receive webhook events for transferred and deleted issues, subscribe
to the issues webhook.
Note
GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request key. Be aware that the id of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will include body_text.
application/vnd.github.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
issue_number (integer) (required)
The number that identifies the issue.
200 - OK
301 - Moved permanently
304 - Not modified
404 - Resource not found
410 - Gone
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER
Response schema (Status: 200):
Same response schema as Create an issue.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER
Response schema (Status: 200):
Same response schema as Create an issue.
PATCH /repos/{owner}/{repo}/issues/{issue_number}
Issue owners and users with push access or Triage role can edit an issue.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will include body_text.
application/vnd.github.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
issue_number (integer) (required)
The number that identifies the issue.
title (null or string or integer)
The title of the issue.
body (string or null)
The contents of the issue.
state (string)
The open or closed state of the issue.
Can be one of: open, closed
state_reason (string or null)
The reason for the state change. Ignored unless state is changed.
Can be one of: completed, not_planned, duplicate, reopened, null
duplicate_issue_id (integer)
The ID of the issue to mark as the canonical duplicate when state_reason is duplicate. The issue must exist and be accessible to the authenticated user. Ignored when state_reason is not duplicate.
milestone (null or string or integer)
The number of the milestone to associate this issue with or use null to remove the current milestone. Only users with push access can set the milestone for issues. Without push access to the repository, milestone changes are silently dropped.
labels (array)
Labels to associate with this issue. Pass one or more labels to replace the set of labels on this issue. Send an empty array ([]) to clear all labels from the issue. Only users with push access can set labels for issues. Without push access to the repository, label changes are silently dropped.
assignees (array)
Usernames to assign to this issue. Pass one or more user logins to replace the set of assignees on this issue. Send an empty array ([]) to clear all assignees from the issue. Only users with push access can set assignees for new issues. Without push access to the repository, assignee changes are silently dropped.
issue_field_values (array of objects)
An array of issue field values to set on this issue. Each field value must include the field ID and the value to set. Only users with push access can set field values for issues
field_id (integer) (required)value (string or number or array) (required)rationale (string)suggest (boolean)confidence (string)low, medium, hightype (null or string or object)
The issue type to associate with this issue. Only users with push access can set the type for issues. Without push access to the repository, type changes are silently dropped.
200 - OK
301 - Moved permanently
403 - Forbidden
404 - Resource not found
410 - Gone
422 - Validation failed, or the endpoint has been spammed.
503 - Service unavailable
Request:
curl -L \
-X PATCH \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER \
-d '{
"title": "Found a bug",
"body": "I'\''m having a problem with this.",
"assignees": [
"octocat"
],
"milestone": 1,
"state": "open",
"labels": [
"bug"
]
}'
Response schema (Status: 200):
id: required, integer, format: int64node_id: required, stringurl: required, string, format: urirepository_url: required, string, format: urilabels_url: required, stringcomments_url: required, string, format: urievents_url: required, string, format: urihtml_url: required, string, format: urinumber: required, integerstate: required, stringstate_reason: string or null, enum: completed, reopened, not_planned, duplicate, nulltitle: required, stringbody: string or nulluser: required, any of:
name: string or nullemail: string or nulllogin: required, stringid: required, integer, format: int64node_id: required, stringavatar_url: required, string, format: urigravatar_id: required, string or nullurl: required, string, format: urihtml_url: required, string, format: urifollowers_url: required, string, format: urifollowing_url: required, stringgists_url: required, stringstarred_url: required, stringsubscriptions_url: required, string, format: uriorganizations_url: required, string, format: urirepos_url: required, string, format: urievents_url: required, stringreceived_events_url: required, string, format: uritype: required, stringsite_admin: required, booleanstarred_at: stringuser_view_type: stringlabels: required, array of items:
id: integer, format: int64node_id: stringurl: string, format: uriname: stringdescription: string or nullcolor: string or nulldefault: booleanarchived_by: all of:
assignees: array of Simple User (see above)milestone: required, any of:
url: required, string, format: urihtml_url: required, string, format: urilabels_url: required, string, format: uriid: required, integernode_id: required, stringnumber: required, integerstate: required, string, enum: open, closed, default: "open"title: required, stringdescription: required, string or nullcreator: required, any of:
open_issues: required, integerclosed_issues: required, integercreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timeclosed_at: required, string or null, format: date-timedue_on: required, string or null, format: date-timelocked: required, booleanactive_lock_reason: string or nullcomments: required, integerpull_request: object:
merged_at: string or null, format: date-timediff_url: required, string or null, format: urihtml_url: required, string or null, format: uripatch_url: required, string or null, format: uriurl: required, string or null, format: uriclosed_at: required, string or null, format: date-timecreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timedraft: booleanclosed_by: any of:
body_html: stringbody_text: stringtimeline_url: string, format: uritype: Issue Type:
id: required, integernode_id: required, stringname: required, stringdescription: required, string or nullcolor: string or null, enum: gray, blue, green, yellow, orange, red, pink, purple, nullcreated_at: string, format: date-timeupdated_at: string, format: date-timeis_enabled: booleanrepository: Repository:
id: required, integer, format: int64node_id: required, stringname: required, stringfull_name: required, stringlicense: required, any of:
key: required, stringname: required, stringurl: required, string or null, format: urispdx_id: required, string or nullnode_id: required, stringhtml_url: string, format: uriforks: required, integerpermissions: object:
admin: required, booleanpull: required, booleantriage: booleanpush: required, booleanmaintain: booleanowner: required, Simple User (see above)private: required, boolean, default: falsehtml_url: required, string, format: uridescription: required, string or nullfork: required, booleanurl: required, string, format: uriarchive_url: required, stringassignees_url: required, stringblobs_url: required, stringbranches_url: required, stringcollaborators_url: required, stringcomments_url: required, stringcommits_url: required, stringcompare_url: required, stringcontents_url: required, stringcontributors_url: required, string, format: urideployments_url: required, string, format: uridownloads_url: required, string, format: urievents_url: required, string, format: uriforks_url: required, string, format: urigit_commits_url: required, stringgit_refs_url: required, stringgit_tags_url: required, stringgit_url: required, stringissue_comment_url: required, stringissue_events_url: required, stringissues_url: required, stringkeys_url: required, stringlabels_url: required, stringlanguages_url: required, string, format: urimerges_url: required, string, format: urimilestones_url: required, stringnotifications_url: required, stringpulls_url: required, stringreleases_url: required, stringssh_url: required, stringstargazers_url: required, string, format: uristatuses_url: required, stringsubscribers_url: required, string, format: urisubscription_url: required, string, format: uritags_url: required, string, format: uriteams_url: required, string, format: uritrees_url: required, stringclone_url: required, stringmirror_url: required, string or null, format: urihooks_url: required, string, format: urisvn_url: required, string, format: urihomepage: required, string or null, format: urilanguage: required, string or nullforks_count: required, integerstargazers_count: required, integerwatchers_count: required, integersize: required, integerdefault_branch: required, stringopen_issues_count: required, integeris_template: boolean, default: falsetopics: array of stringhas_issues: required, boolean, default: truehas_projects: required, boolean, default: truehas_wiki: required, boolean, default: truehas_pages: required, booleanhas_discussions: boolean, default: falsehas_pull_requests: boolean, default: truepull_request_creation_policy: string, enum: all, collaborators_onlyarchived: required, boolean, default: falsedisabled: required, booleanvisibility: string, default: "public"pushed_at: required, string or null, format: date-timecreated_at: required, string or null, format: date-timeupdated_at: required, string or null, format: date-timeallow_rebase_merge: boolean, default: truetemp_clone_token: stringallow_squash_merge: boolean, default: trueallow_auto_merge: boolean, default: falsedelete_branch_on_merge: boolean, default: falseallow_update_branch: boolean, default: falsesquash_merge_commit_title: string, enum: PR_TITLE, COMMIT_OR_PR_TITLEsquash_merge_commit_message: string, enum: PR_BODY, COMMIT_MESSAGES, BLANKmerge_commit_title: string, enum: PR_TITLE, MERGE_MESSAGEmerge_commit_message: string, enum: PR_BODY, PR_TITLE, BLANKallow_merge_commit: boolean, default: trueallow_forking: booleanweb_commit_signoff_required: boolean, default: falseopen_issues: required, integerwatchers: required, integerstarred_at: stringanonymous_access_enabled: booleancode_search_index_status: object:
lexical_search_ok: booleanlexical_commit_sha: stringperformed_via_github_app: any of:
id: required, integerslug: stringnode_id: required, stringclient_id: stringowner: required, one of:
description: string or nullhtml_url: required, string, format: uriwebsite_url: string or null, format: uriid: required, integernode_id: required, stringname: required, stringslug: required, stringcreated_at: required, string or null, format: date-timeupdated_at: required, string or null, format: date-timeavatar_url: required, string, format: uriname: required, stringdescription: required, string or nullexternal_url: required, string, format: urihtml_url: required, string, format: uricreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timepermissions: required, object, additional properties: string:
issues: stringchecks: stringmetadata: stringcontents: stringdeployments: stringevents: required, array of stringinstallations_count: integerauthor_association: string, enum: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNERreactions: Reaction Rollup:
url: required, string, format: uritotal_count: required, integer+1: required, integer-1: required, integerlaugh: required, integerconfused: required, integerheart: required, integerhooray: required, integereyes: required, integerrocket: required, integersub_issues_summary: Sub-issues Summary:
total: required, integercompleted: required, integerpercent_completed: required, integerparent_issue_url: string or null, format: uripinned_comment: any of:
id: required, integer, format: int64node_id: required, stringurl: required, string, format: uribody: stringbody_text: stringbody_html: stringhtml_url: required, string, format: uriuser: required, any of:
created_at: required, string, format: date-timeupdated_at: required, string, format: date-timeissue_url: required, string, format: uriauthor_association: string, enum: COLLABORATOR, CONTRIBUTOR, FIRST_TIMER, FIRST_TIME_CONTRIBUTOR, MANNEQUIN, MEMBER, NONE, OWNERperformed_via_github_app: any of:
reactions: Reaction Rollup (see above)pin: any of:
pinned_at: required, string, format: date-timepinned_by: required, any of:
minimized: any of:
reason: required, string or nullissue_dependencies_summary: Issue Dependencies Summary:
blocked_by: required, integerblocking: required, integertotal_blocked_by: required, integertotal_blocking: required, integerissue_field_values: array of Issue Field Value:
issue_field_id: required, integer, format: int64issue_field_name: stringnode_id: required, stringdata_type: required, string, enum: text, single_select, multi_select, number, datevalue: required, any of:
single_select_option: object or null:
id: required, integer, format: int64name: required, stringcolor: required, stringmulti_select_options: array of objects or null:
id: required, integer, format: int64name: required, stringcolor: required, stringsuggestions: object:
type: array of objects:
value: stringrationale: stringsuggest: booleanconfidence: string, enum: low, medium, highignored: booleanignored_reason: string, enum: already_applied, issue_already_closedissue_field_values: array of objects:
field_id: integervalue: one of:
rationale: stringsuggest: booleanconfidence: string, enum: low, medium, highignored: booleanignored_reason: string, enum: already_applied, issue_already_closedlabels: array of objects:
name: stringrationale: stringsuggest: booleanconfidence: string, enum: low, medium, highignored: booleanignored_reason: string, enum: already_applied, issue_already_closedassignees: array of objects:
login: stringrationale: stringsuggest: booleanconfidence: string, enum: low, medium, highignored: booleanignored_reason: string, enum: already_applied, issue_already_closedstate: array of objects:
value: stringstate_reason: stringduplicate_issue_id: integerrationale: stringsuggest: booleanconfidence: string, enum: low, medium, highignored: booleanignored_reason: string, enum: already_applied, issue_already_closedPUT /repos/{owner}/{repo}/issues/{issue_number}/lock
Users with push access can lock an issue or pull request's conversation.
Note that, if you choose not to pass any parameters, you'll need to set Content-Length to zero when calling out to this endpoint. For more information, see "HTTP method."
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
issue_number (integer) (required)
The number that identifies the issue.
lock_reason (string)
The reason for locking the issue or pull request conversation. Lock will fail if you don't use one of these reasons:
off-topic
too heated
resolved
spam
Can be one of: off-topic, too heated, resolved, spam
204 - No Content
403 - Forbidden
404 - Resource not found
410 - Gone
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X PUT \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/lock \
-d '{
"lock_reason": "off-topic"
}'
Response schema (Status: 204):
DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock
Users with push access can unlock an issue's conversation.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
issue_number (integer) (required)
The number that identifies the issue.
204 - No Content
403 - Forbidden
404 - Resource not found
Request:
curl -L \
-X DELETE \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/lock
Response schema (Status: 204):
GET /repos/{owner}/{repo}/issues/{issue_number}/relates_to
You can use the REST API to list the issues that are related to an issue.
This endpoint supports the following custom media types. For more information, see Media types.
application/vnd.github.raw+json: Returns the raw Markdown body. Response will include body. This is the default if you do not pass any specific media type.
application/vnd.github.text+json: Returns a text only representation of the Markdown body. Response will include body_text.
application/vnd.github.html+json: Returns HTML rendered from the body's Markdown. Response will include body_html.
application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
issue_number (integer) (required)
The number that identifies the issue.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
301 - Moved permanently
404 - Resource not found
410 - Gone
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/relates_to
Response schema (Status: 200):
Same response schema as List issues assigned to the authenticated user.
POST /repos/{owner}/{repo}/issues/{issue_number}/relates_to
You can use the REST API to mark an issue as related to another issue.
Creating content too quickly using this endpoint may result in secondary rate limiting.
For more information, see Rate limits for the API
and Best practices for using the REST API.
This endpoint supports the following custom media types. For more information, see Media types.
application/vnd.github.raw+json: Returns the raw Markdown body. Response will include body. This is the default if you do not pass any specific media type.
application/vnd.github.text+json: Returns a text only representation of the Markdown body. Response will include body_text.
application/vnd.github.html+json: Returns HTML rendered from the body's Markdown. Response will include body_html.
application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
issue_number (integer) (required)
The number that identifies the issue.
issue_id (integer) (required)201 - Created
301 - Moved permanently
403 - Forbidden
404 - Resource not found
410 - Gone
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/relates_to \
-d '{
"issue_id": 1
}'
Response schema (Status: 201):
Same response schema as Create an issue.
DELETE /repos/{owner}/{repo}/issues/{issue_number}/relates_to/{issue_id}
You can use the REST API to remove a 'relates to' relationship between two issues.
Removing content too quickly using this endpoint may result in secondary rate limiting.
For more information, see Rate limits for the API
and Best practices for using the REST API.
This endpoint supports the following custom media types. For more information, see Media types.
application/vnd.github.raw+json: Returns the raw Markdown body. Response will include body. This is the default if you do not pass any specific media type.
application/vnd.github.text+json: Returns a text only representation of the Markdown body. Response will include body_text.
application/vnd.github.html+json: Returns HTML rendered from the body's Markdown. Response will include body_html.
application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
issue_number (integer) (required)
The number that identifies the issue.
issue_id (integer) (required)
The id of the related issue to remove
200 - OK
301 - Moved permanently
400 - Bad Request
403 - Forbidden
404 - Resource not found
410 - Gone
Request:
curl -L \
-X DELETE \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/relates_to/ISSUE_ID
Response schema (Status: 200):
Same response schema as Create an issue.
GET /repos/{owner}/{repo}/issues/{issue_number}/suggestions
Lists the suggestions on an issue. A suggestion is an agent-proposed change to an issue's type, labels, fields, assignees, or closed state that a maintainer can approve or dismiss.
By default only pending suggestions are returned. Use state=all to return suggestions in every state, or state=
This endpoint is only available while the issue suggestions feature is enabled for the repository, and only supports issues, not pull requests.
Requires triage access to the repository.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
issue_number (integer) (required)
The number that identifies the issue.
state (string)
Filter suggestions by their state.
Default: pending
Can be one of: pending, applied, approved, dismissed, replaced, invalidated, all
action (string)
Filter suggestions by the change they propose.
Can be one of: set_type, add_label, add_field, add_assignee, close_issue
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X GET \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/suggestions
Response schema (Status: 200):
Array of Issue Suggestion:
id: required, integerissue_id: required, integeraction: required, string, enum: set_type, add_label, add_field, add_assignee, close_issuestate: required, string, enum: pending, applied, approved, dismissed, replaced, invalidatedtarget_id: required, integer or nulltarget_value: required, one of:
rationale: required, string or nullconfidence: required, string or null, enum: LOW, MEDIUM, HIGH, nullactor_id: required, integer or nullissue_event_id: required, integer or nullresolved_by: required, integer or nullcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timePOST /repos/{owner}/{repo}/issues/{issue_number}/suggestions/{suggestion_id}/approve
Approves a pending suggestion on an issue. Applies the proposed change (creating the corresponding timeline event), transitions the suggestion to approved, and dismisses any competing pending suggestions for the same change.
Requires triage access to the repository. Approving a suggestion also requires permission to perform the change it applies (for example, setting the issue type, adding a label or assignee, or closing the issue); this only affects fine-grained access tokens and GitHub Apps whose permissions are narrower than the triage role. This endpoint only supports issues, not pull requests.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
issue_number (integer) (required)
The number that identifies the issue.
suggestion_id (integer) (required)
The unique identifier of the suggestion.
200 - OK
403 - Forbidden
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/suggestions/SUGGESTION_ID/approve
Response schema (Status: 200):
id: required, integerissue_id: required, integeraction: required, string, enum: set_type, add_label, add_field, add_assignee, close_issuestate: required, string, enum: pending, applied, approved, dismissed, replaced, invalidatedtarget_id: required, integer or nulltarget_value: required, one of:
rationale: required, string or nullconfidence: required, string or null, enum: LOW, MEDIUM, HIGH, nullactor_id: required, integer or nullissue_event_id: required, integer or nullresolved_by: required, integer or nullcreated_at: required, string, format: date-timeupdated_at: required, string, format: date-timePOST /repos/{owner}/{repo}/issues/{issue_number}/suggestions/{suggestion_id}/dismiss
Dismisses a pending suggestion on an issue. Transitions the suggestion to dismissed without applying any change or creating a timeline event.
Requires triage access to the repository. This endpoint only supports issues, not pull requests.
accept (string)application/vnd.github+json is recommended.owner (string) (required)
The account owner of the repository. The name is not case sensitive.
repo (string) (required)
The name of the repository without the .git extension. The name is not case sensitive.
issue_number (integer) (required)
The number that identifies the issue.
suggestion_id (integer) (required)
The unique identifier of the suggestion.
200 - OK
403 - Forbidden
404 - Resource not found
422 - Validation failed, or the endpoint has been spammed.
Request:
curl -L \
-X POST \
https://api.github.com/repos/OWNER/REPO/issues/ISSUE_NUMBER/suggestions/SUGGESTION_ID/dismiss
Response schema (Status: 200):
Same response schema as Approve an issue suggestion.
GET /user/issues
List issues across owned and member repositories assigned to the authenticated user.
Note
GitHub's REST API considers every pull request an issue, but not every issue is a pull request. For this reason, "Issues" endpoints may return both issues and pull requests in the response. You can identify pull requests by the pull_request key. Be aware that the id of a pull request returned from "Issues" endpoints will be an issue id. To find out the pull request id, use the "List pull requests" endpoint.
This endpoint supports the following custom media types. For more information, see "Media types."
application/vnd.github.raw+json: Returns the raw markdown body. Response will include body. This is the default if you do not pass any specific media type.
application/vnd.github.text+json: Returns a text only representation of the markdown body. Response will include body_text.
application/vnd.github.html+json: Returns HTML rendered from the body's markdown. Response will include body_html.
application/vnd.github.full+json: Returns raw, text, and HTML representations. Response will include body, body_text, and body_html.
accept (string)application/vnd.github+json is recommended.filter (string)
Indicates 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.
Default: assigned
Can be one of: assigned, created, mentioned, subscribed, repos, all
state (string)
Indicates the state of the issues to return.
Default: open
Can be one of: open, closed, all
labels (string)
A list of comma separated label names. Example: bug,ui,@high
sort (string)
What to sort results by.
Default: created
Can be one of: created, updated, comments
direction (string)
The direction to sort the results by.
Default: desc
Can be one of: asc, desc
since (string)
Only show results that were last updated after the given time. This is a timestamp in ISO 8601 format: YYYY-MM-DDTHH:MM:SSZ.
per_page (integer)
The number of results per page (max 100). For more information, see "Using pagination in the REST API."
Default: 30
page (integer)
The page number of the results to fetch. For more information, see "Using pagination in the REST API."
Default: 1
200 - OK
304 - Not modified
404 - Resource not found
Request:
curl -L \
-X GET \
https://api.github.com/user/issues
Response schema (Status: 200):
Same response schema as List issues assigned to the authenticated user.