Download OpenAPI specification:
Evidence-based OpenAPI 3.0.3 specification for a tested subset of the GitHub Issues REST API.
Scope:
Evidence approach:
List issues for a repository.
Default behavior:
state=open when state is omitted.per_page is 30.Pagination:
per_page and page.Verified in: Test #1, Test #2, Test #11, Test #12, Test #13
| owner required | string Example: facebook Repository owner (organization or user). |
| repo required | string Example: react Repository name. |
| per_page | integer Default: 30 Results per page. Behavior:
|
| page | integer >= 0 Default: 1 Page number of results to fetch. Behavior:
|
| state | string Default: "open" Enum: "open" "closed" "all" Filter issues by state. Defaults:
Verified in: Test #1, Test #2, Test #3, Test #4 |
| labels | string Examples:
Filter issues by labels. Format:
Behavior:
Verified in: Test #14, Test #15 |
| assignee | string Examples:
Filter issues by assignee. Accepted values:
Verified in: Test #16 |
| creator | string Filter by the issue creator username. (Verified in: Test #17) |
| mentioned | string Filter by a user mentioned in the issue body or comments. (Verified in: Test #18) |
| sort | string Default: "created" Enum: "created" "updated" "comments" Examples:
Sort issues. Allowed values: Fallback:
Verified in: Test #17, Test #18, Test #19, Test #77 |
| direction | string Default: "desc" Enum: "asc" "desc" Sort direction. Defaults:
Verified in: Test #20, Test #21 |
| since | string <date-time> Only issues updated at or after this time are returned. Observed in tests as ISO 8601 |
| Accept | string Default: application/vnd.github+json Example: application/vnd.github+json Optional media type for GitHub REST API responses. Tested variants:
Verified in: Test #31, Test #32, Test #33, Test #34 |
| X-GitHub-Api-Version | string Default: 2022-11-28 Example: 2022-11-28 Optional GitHub API version header. Notes:
Verified in: Test #1 |
[- {
- "number": 35400,
- "title": "Example issue title",
- "state": "open",
- "labels": [ ],
- "assignees": [ ],
- "comments": 8,
- "created_at": "2025-12-21T16:57:38Z",
- "updated_at": "2025-12-21T17:20:22Z"
}
]Create a new issue.
Required:
title is required.Validation:
title returns 422.Empty arrays:
labels: [] is accepted and returned as labels: [].assignees: [] is accepted and returned as assignees: [] with assignee: null.Verified in: Test #6, Test #7, Test #37, Test #38, Test #54, Test #55
| owner required | string Example: facebook Repository owner (organization or user). |
| repo required | string Example: react Repository name. |
| Accept | string Default: application/vnd.github+json Example: application/vnd.github+json Optional media type for GitHub REST API responses. Tested variants:
Verified in: Test #31, Test #32, Test #33, Test #34 |
| X-GitHub-Api-Version | string Default: 2022-11-28 Example: 2022-11-28 Optional GitHub API version header. Notes:
Verified in: Test #1 |
| title required | string non-empty The title of the issue. |
| body | string Markdown-supported issue body. |
| labels | Array of strings Label names to apply. Observed: labels applied successfully when the caller has permission. (Verified in: Test #7)
Observed: GitHub accepts |
| assignees | Array of strings Usernames to assign to this issue. Observed: assignees applied successfully when caller has permission. (Verified in: Test #7)
Observed: GitHub accepts |
Minimal create request. Verified in: Test #6
{- "title": "Test Issue"
}Minimal create response excerpt. Verified in: Test #6
{- "number": 1,
- "title": "Test Issue",
- "state": "open",
- "labels": [ ],
- "assignees": [ ],
- "assignee": null,
- "body": null,
- "created_at": "2025-12-12T05:42:46Z",
- "updated_at": "2025-12-12T05:42:46Z",
- "state_reason": null,
- "comments": 0
}Retrieve a single issue by number.
Notes:
Accept header (see Accept parameter).Verified in: Test #5, Test #31, Test #32, Test #33, Test #34
| owner required | string Example: facebook Repository owner (organization or user). |
| repo required | string Example: react Repository name. |
| issue_number required | string^[0-9]+$ Example: 1 Issue number. |
| Accept | string Default: application/vnd.github+json Example: application/vnd.github+json Optional media type for GitHub REST API responses. Tested variants:
Verified in: Test #31, Test #32, Test #33, Test #34 |
| X-GitHub-Api-Version | string Default: 2022-11-28 Example: 2022-11-28 Optional GitHub API version header. Notes:
Verified in: Test #1 |
{- "number": 1,
- "title": "Run each test in its own <iframe>",
- "state": "closed",
- "body": "This is not blocking the initial launch...",
- "created_at": "2013-05-29T20:20:53Z",
- "updated_at": "2025-12-19T20:59:36Z",
- "closed_at": "2013-06-03T17:58:02Z",
- "labels": [ ],
- "assignees": [ ],
- "comments": 5
}Partially update an issue (PATCH semantics).
Common updates:
state=closed with state_reason=completed or state_reason=not_planned.state=closed without state_reason returns state_reason=completed.state=open returns state_reason=reopened.Empty arrays:
labels: [] clears labels.assignees: [] clears assignees and sets assignee: null.Validation:
state can return 422 validation errors.state_reason=reopened while closing (state=closed) returns 422.Permissions:
403 Forbidden.Verified in: Test #8, Test #9, Test #41, Test #56, Test #57, Test #60, Test #61, Test #62, Test #63, Test #67, Test #79
| owner required | string Example: facebook Repository owner (organization or user). |
| repo required | string Example: react Repository name. |
| issue_number required | string^[0-9]+$ Example: 1 Issue number. |
| Accept | string Default: application/vnd.github+json Example: application/vnd.github+json Optional media type for GitHub REST API responses. Tested variants:
Verified in: Test #31, Test #32, Test #33, Test #34 |
| X-GitHub-Api-Version | string Default: 2022-11-28 Example: 2022-11-28 Optional GitHub API version header. Notes:
Verified in: Test #1 |
| title | string New issue title. |
| body | string New issue body. |
| state | string Enum: "open" "closed" Issue state. |
| state_reason | string Enum: "completed" "not_planned" "reopened" Reason for closing or reopening an issue. Observed behavior:
Validation:
Verified in: Test #60, Test #61, Test #62, Test #63, Test #79 |
| labels | Array of strings Label names to set on the issue (replace semantics). Observed: Sending |
| assignees | Array of strings Usernames to assign to this issue (replace semantics). Observed: Sending |
{- "title": "Updated Title via API - Test #8"
}Response excerpt after closing. Verified in: Test #60
{- "number": 2,
- "state": "closed",
- "state_reason": "completed",
- "closed_at": "2026-01-06T22:17:22Z",
- "updated_at": "2026-01-06T22:17:22Z",
- "title": "Test Issue - All Fields",
- "labels": [ ],
- "assignees": [ ],
- "comments": 2,
- "created_at": "2025-12-13T06:20:04Z"
}List comments for an issue.
Behavior:
Filters:
since filters by updated_at timestamp.Pagination:
per_page and page.Verified in: Test #10, Test #29, Test #30
| owner required | string Example: facebook Repository owner (organization or user). |
| repo required | string Example: react Repository name. |
| issue_number required | string^[0-9]+$ Example: 1 Issue number. |
| Accept | string Default: application/vnd.github+json Example: application/vnd.github+json Optional media type for GitHub REST API responses. Tested variants:
Verified in: Test #31, Test #32, Test #33, Test #34 |
| X-GitHub-Api-Version | string Default: 2022-11-28 Example: 2022-11-28 Optional GitHub API version header. Notes:
Verified in: Test #1 |
[- {
- "id": 0,
- "node_id": "string",
- "reactions": { },
- "performed_via_github_app": { },
- "body": "string",
- "author_association": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}
]Create a comment on an issue.
Required:
body is required.Validation:
body returns 422.Verified in: Test #23, Test #24, Test #64
| owner required | string Example: facebook Repository owner (organization or user). |
| repo required | string Example: react Repository name. |
| issue_number required | string^[0-9]+$ Example: 1 Issue number. |
| Accept | string Default: application/vnd.github+json Example: application/vnd.github+json Optional media type for GitHub REST API responses. Tested variants:
Verified in: Test #31, Test #32, Test #33, Test #34 |
| X-GitHub-Api-Version | string Default: 2022-11-28 Example: 2022-11-28 Optional GitHub API version header. Notes:
Verified in: Test #1 |
| body required | string non-empty The contents of the comment (Markdown supported). |
{- "body": "Thanks! Reproduced on the latest version."
}Basic create-comment response excerpt. Verified in: Test #26
{- "id": 3673471450,
- "body": "This is a test comment created via API.",
- "created_at": "2025-12-19T04:51:40Z",
- "updated_at": "2025-12-19T04:51:40Z",
- "user": {
- "login": "derrickscottux-collab",
- "id": 243489198
}
}Retrieve a single issue comment by comment ID.
Verified in: Test #25
| owner required | string Example: facebook Repository owner (organization or user). |
| repo required | string Example: react Repository name. |
| comment_id required | integer >= 1 Issue comment id. |
| Accept | string Default: application/vnd.github+json Example: application/vnd.github+json Optional media type for GitHub REST API responses. Tested variants:
Verified in: Test #31, Test #32, Test #33, Test #34 |
| X-GitHub-Api-Version | string Default: 2022-11-28 Example: 2022-11-28 Optional GitHub API version header. Notes:
Verified in: Test #1 |
{- "id": 0,
- "node_id": "string",
- "reactions": { },
- "performed_via_github_app": { },
- "body": "string",
- "author_association": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Update an issue comment.
Required:
body is required.Validation:
body returns 422.Verified in: Test #26, Test #65
| owner required | string Example: facebook Repository owner (organization or user). |
| repo required | string Example: react Repository name. |
| comment_id required | integer >= 1 Issue comment id. |
| Accept | string Default: application/vnd.github+json Example: application/vnd.github+json Optional media type for GitHub REST API responses. Tested variants:
Verified in: Test #31, Test #32, Test #33, Test #34 |
| X-GitHub-Api-Version | string Default: 2022-11-28 Example: 2022-11-28 Optional GitHub API version header. Notes:
Verified in: Test #1 |
| body required | string non-empty Updated comment body (Markdown supported). |
{- "body": "string"
}{- "id": 0,
- "node_id": "string",
- "reactions": { },
- "performed_via_github_app": { },
- "body": "string",
- "author_association": "string",
- "created_at": "2019-08-24T14:15:22Z",
- "updated_at": "2019-08-24T14:15:22Z"
}Delete an issue comment.
Observed:
204 No Content on success.Verified in: Test #27
| owner required | string Example: facebook Repository owner (organization or user). |
| repo required | string Example: react Repository name. |
| comment_id required | integer >= 1 Issue comment id. |
| Accept | string Default: application/vnd.github+json Example: application/vnd.github+json Optional media type for GitHub REST API responses. Tested variants:
Verified in: Test #31, Test #32, Test #33, Test #34 |
| X-GitHub-Api-Version | string Default: 2022-11-28 Example: 2022-11-28 Optional GitHub API version header. Notes:
Verified in: Test #1 |
{- "message": "Requires authentication",
- "status": "401"
}