---
title: "Link a build to a commit for CI status checks"
method: POST
path: "/v1/builds/{id}/ci"
tags: ["Builds"]
---

# Link a build to a commit for CI status checks

`POST /v1/builds/{id}/ci`

Associates a CI build with the commit/PR it ran for on a code host and posts an in-progress status check. Currently supports `github` (requires the TestingBot GitHub App installed on the repository owner). Call this at the start of a workflow run.

## Path parameters

- `id` string, required

## Request body

- PostV1BuildsIdCi — Link a build to a commit for CI status checks
  - `repo` string, required — Repository in owner/name form.
  - `commit_sha` string, required — Head commit SHA the build ran for. For pull_request events use github.event.pull_request.head.sha (not the merge commit) so the check lands on the SHA branch protection evaluates.
  - `provider` string — Code host provider. Currently only "github".
  - `branch` string — Git branch name.
  - `pull_request_number` integer — Pull request number, if any.

## Response `201`

Link a build to a commit for CI status checks

- TestingbotEntitiesAck — Testingbot_Entities_Ack model
  - `success` boolean, required — Whether the operation succeeded.
  - `errors` object, required — Validation errors keyed by field name. Only present when `success` is false.
  - `error` string, required — Single human-readable reason, used by the older endpoints in place of `errors`. Only present when `success` is false.

## Other responses

- `401` — Authentication required
- `404` — Integration not installed for this repository

---

[API](https://skmtc.net/testingbot/apis/testingbot-rest-api.md) · [All operations](https://skmtc.net/testingbot/apis/testingbot-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/testingbot/testingbot-rest-api/versions/eff607a49246/schema)
