REST API endpoints for check runs

Use the REST API to manage check runs.

Note

Write permission for the REST API to interact with checks is only available to GitHub Apps. OAuth apps and authenticated users can view check runs and check suites, but they are not able to create them. If you aren't building a GitHub App, you might be interested in using the REST API to interact with commit statuses.

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.

Create a check run

POST /repos/{owner}/{repo}/check-runs

Creates a new check run for a specific commit in a repository.
To create a check run, you must use a GitHub App. OAuth apps and authenticated users are not able to create a check suite.
In a check suite, GitHub limits the number of check runs with the same name to 1000. Once these check runs exceed 1000, GitHub will start to automatically delete older check runs.
Note

The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example of an in_progress conclusion

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/check-runs \
  -d '{
  "name": "mighty_readme",
  "head_sha": "ce587453ced02b1526dfb4cb910479d431683101",
  "status": "in_progress",
  "external_id": "42",
  "started_at": "2018-05-04T01:14:52Z",
  "output": {
    "title": "Mighty Readme report",
    "summary": "",
    "text": ""
  }
}'

Response schema (Status: 201):

Example of a completed conclusion

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/check-runs \
  -d '{
  "name": "mighty_readme",
  "head_sha": "ce587453ced02b1526dfb4cb910479d431683101",
  "status": "completed",
  "started_at": "2017-11-30T19:39:10Z",
  "conclusion": "success",
  "completed_at": "2017-11-30T19:49:10Z",
  "output": {
    "title": "Mighty Readme report",
    "summary": "There are 0 failures, 2 warnings, and 1 notices.",
    "text": "You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.",
    "annotations": [
      {
        "path": "README.md",
        "annotation_level": "warning",
        "title": "Spell Checker",
        "message": "Check your spelling for '\''banaas'\''.",
        "raw_details": "Do you mean '\''bananas'\'' or '\''banana'\''?",
        "start_line": 2,
        "end_line": 2
      },
      {
        "path": "README.md",
        "annotation_level": "warning",
        "title": "Spell Checker",
        "message": "Check your spelling for '\''aples'\''",
        "raw_details": "Do you mean '\''apples'\'' or '\''Naples'\''",
        "start_line": 4,
        "end_line": 4
      }
    ],
    "images": [
      {
        "alt": "Super bananas",
        "image_url": "http://example.com/images/42"
      }
    ]
  },
  "actions": [
    {
      "label": "Fix",
      "identifier": "fix_errors",
      "description": "Allow us to fix these errors for you"
    }
  ]
}'

Response schema (Status: 201):

Get a check run

GET /repos/{owner}/{repo}/check-runs/{check_run_id}

Gets a single check run using its id.
Note

The Checks API only looks for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint on a private repository.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/check-runs/CHECK_RUN_ID

Response schema (Status: 200):

Same response schema as Create a check run.

Update a check run

PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}

Updates a check run for a specific commit in a repository.
Note

The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.

OAuth apps and personal access tokens (classic) cannot use this endpoint.

Parameters

Headers

Path and query parameters

Body parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X PATCH \
  https://api.github.com/repos/OWNER/REPO/check-runs/CHECK_RUN_ID \
  -d '{
  "name": "mighty_readme",
  "started_at": "2018-05-04T01:14:52Z",
  "status": "completed",
  "conclusion": "success",
  "completed_at": "2018-05-04T01:14:52Z",
  "output": {
    "title": "Mighty Readme report",
    "summary": "There are 0 failures, 2 warnings, and 1 notices.",
    "text": "You may have some misspelled words on lines 2 and 4. You also may want to add a section in your README about how to install your app.",
    "annotations": [
      {
        "path": "README.md",
        "annotation_level": "warning",
        "title": "Spell Checker",
        "message": "Check your spelling for '\''banaas'\''.",
        "raw_details": "Do you mean '\''bananas'\'' or '\''banana'\''?",
        "start_line": 2,
        "end_line": 2
      },
      {
        "path": "README.md",
        "annotation_level": "warning",
        "title": "Spell Checker",
        "message": "Check your spelling for '\''aples'\''",
        "raw_details": "Do you mean '\''apples'\'' or '\''Naples'\''",
        "start_line": 4,
        "end_line": 4
      }
    ],
    "images": [
      {
        "alt": "Super bananas",
        "image_url": "http://example.com/images/42"
      }
    ]
  }
}'

Response schema (Status: 200):

Same response schema as Create a check run.

List check run annotations

GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations

Lists annotations for a check run using the annotation id.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint on a private repository.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/check-runs/CHECK_RUN_ID/annotations

Response schema (Status: 200):

Array of Check Annotation:

Rerequest a check run

POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest

Triggers GitHub to rerequest an existing check run, without pushing new code to a repository. This endpoint will trigger the check_run webhook event with the action rerequested. When a check run is rerequested, the status of the check suite it belongs to is reset to queued and the conclusion is cleared. The check run itself is not updated. GitHub apps recieving the check_run webhook with the rerequested action should then decide if the check run should be reset or updated and call the update check_run endpoint to update the check_run if desired.
For more information about how to re-run GitHub Actions jobs, see "Re-run a job from a workflow run".

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X POST \
  https://api.github.com/repos/OWNER/REPO/check-runs/CHECK_RUN_ID/rerequest

Response schema (Status: 201):

List check runs in a check suite

GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs

Lists check runs for a check suite using its id.
Note

The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.

OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint on a private repository.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/check-suites/CHECK_SUITE_ID/check-runs

Response schema (Status: 200):

List check runs for a Git reference

GET /repos/{owner}/{repo}/commits/{ref}/check-runs

Lists check runs for a commit ref. The ref can be a SHA, branch name, or a tag name.
Note

The endpoints to manage checks only look for pushes in the repository where the check suite or check run were created. Pushes to a branch in a forked repository are not detected and return an empty pull_requests array.

If there are more than 1000 check suites on a single git reference, this endpoint will limit check runs to the 1000 most recent check suites. To iterate over all possible check runs, use the List check suites for a Git reference endpoint and provide the check_suite_id parameter to the List check runs in a check suite endpoint.
OAuth app tokens and personal access tokens (classic) need the repo scope to use this endpoint on a private repository.

Parameters

Headers

Path and query parameters

HTTP response status codes

Code examples

Example

Request:

curl -L \
  -X GET \
  https://api.github.com/repos/OWNER/REPO/commits/REF/check-runs

Response schema (Status: 200):

Same response schema as List check runs in a check suite.