Sample - GitHub REST API
POST/repos/{owner}/{repo}/check-suites

Create a check suite

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".

[!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 and a null value for head_branch.

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

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.

2 parameters · 1 body field
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
head_shastringrequired
The sha of the head commit.

2 status codes
200Response when the suite already exists
idintegerrequired
node_idstringrequired
head_branchstringrequired
head_shastringrequired
The SHA of the head commit that is being checked.
statusstringrequired
The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites.
Allowed:queuedin_progresscompletedwaitingrequestedpending
conclusionstringrequired
Allowed:successfailureneutralcancelledskippedtimed_outaction_requiredstartup_failurestalenull
urlstringrequired
beforestringrequired
afterstringrequired
pull_requestsarray<PullRequestMinimal>required
appobjectrequired
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
repositoryobjectrequired
Minimal Repository
created_atstringrequired
updated_atstringrequired
head_commitobjectrequired
A commit.
latest_check_runs_countintegerrequired
check_runs_urlstringrequired
rerequestablebooleanoptional
runs_rerequestablebooleanoptional
201Response when the suite was created
idintegerrequired
node_idstringrequired
head_branchstringrequired
head_shastringrequired
The SHA of the head commit that is being checked.
statusstringrequired
The phase of the lifecycle that the check suite is currently in. Statuses of waiting, requested, and pending are reserved for GitHub Actions check suites.
Allowed:queuedin_progresscompletedwaitingrequestedpending
conclusionstringrequired
Allowed:successfailureneutralcancelledskippedtimed_outaction_requiredstartup_failurestalenull
urlstringrequired
beforestringrequired
afterstringrequired
pull_requestsarray<PullRequestMinimal>required
appobjectrequired
GitHub apps are a new way to extend GitHub. They can be installed directly on organizations and user accounts and granted access to specific repositories. They come with granular permissions and built-in webhooks. GitHub apps are first class actors within GitHub.
repositoryobjectrequired
Minimal Repository
created_atstringrequired
updated_atstringrequired
head_commitobjectrequired
A commit.
latest_check_runs_countintegerrequired
check_runs_urlstringrequired
rerequestablebooleanoptional
runs_rerequestablebooleanoptional