← All tags

Checks API Reference

Rich interactions with checks run by your integrations.

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

No endpoints match your search.

Create a check run

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

Creates a new check run for a specific commit 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.

Responses

StatusDescriptionHas JSON body
201Responseyes

Get a check run

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

Gets a single check run using its 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.
check_run_idpathyesThe unique identifier of the check run.

Responses

StatusDescriptionHas JSON body
200Responseyes

Update a check run

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

Updates a check run for a specific commit 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.
check_run_idpathyesThe unique identifier of the check run.

Responses

StatusDescriptionHas JSON body
200Responseyes

List check run annotations

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

Lists annotations for a check run using the annotation 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.
check_run_idpathyesThe unique identifier of the check run.
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

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.

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.
check_run_idpathyesThe unique identifier of the check run.

Responses

StatusDescriptionHas JSON body
201Responseyes
403Forbidden if the check run is not rerequestable or doesn't belong to the authenticated GitHub Appyes
422Validation error if the check run is not rerequestableyes
404Resource not foundyes

Create a check suite

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

Creates a check suite manually. By default, check suites are automatically created when you create a check run. You only need to use this endpoint for manually creating check suites when you've disabled automatic creation using "Update repository preferences for check suites".

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
200Response when the suite already existsyes
201Response when the suite was createdyes

Update repository preferences for check suites

PATCH /repos/{owner}/{repo}/check-suites/preferences

Changes the default automatic flow when creating check suites. By default, a check suite is automatically created each time code is pushed to a repository. When you disable the automatic creation of check suites, you can manually Create a check suite.

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
200Responseyes

Get a check suite

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

Gets a single check suite using its 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.
check_suite_idpathyesThe unique identifier of the check suite.

Responses

StatusDescriptionHas JSON body
200Responseyes

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.

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.
check_suite_idpathyesThe unique identifier of the check suite.
check_namequerynoReturns check runs with the specified name.
statusquerynoReturns check runs with the specified status.
filterquerynoFilters check runs by their completed_at timestamp. latest returns the most recent check runs.
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

Rerequest a check suite

POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest

Triggers GitHub to rerequest an existing check suite, without pushing new code to a repository. This endpoint will trigger the check_suite webhook event with the action rerequested. When a check suite is rerequested, its status is reset to queued and the conclusion is cleared.

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.
check_suite_idpathyesThe unique identifier of the check suite.

Responses

StatusDescriptionHas JSON body
201Responseyes

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.

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.
refpathyesThe commit reference. Can be a commit SHA, branch name (heads/BRANCH_NAME), or tag name (tags/TAG_NAME). For more information, see "Git References" in the Git documentation.
check_namequerynoReturns check runs with the specified name.
statusquerynoReturns check runs with the specified status.
filterquerynoFilters check runs by their completed_at timestamp. latest returns the most recent check runs.
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."
app_idqueryno

Responses

StatusDescriptionHas JSON body
200Responseyes

List check suites for a Git reference

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

Lists check suites for a commit ref. The ref can be a SHA, branch name, or a tag 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.
refpathyesThe commit reference. Can be a commit SHA, branch name (heads/BRANCH_NAME), or tag name (tags/TAG_NAME). For more information, see "Git References" in the Git documentation.
app_idquerynoFilters check suites by GitHub App id.
check_namequerynoReturns check runs with the specified name.
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