> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clickproof.app/llms.txt
> Use this file to discover all available pages before exploring further.

# API reference

> The clickproof CI API — drive builds, runs, and results from any pipeline.

The `/api/v1` endpoints let any CI system or script do what the
[`clickproof-ai/run-tests`](/ci-cd/github-actions) Action does: upload a build,
run a project's tests, and poll for the verdict.

## Base URL

```
https://clickproof.app/api/v1
```

<Note>
  Until a custom domain is attached, use the Cloudflare Workers URL for your
  environment — the exact base URL is shown in **Integrations → GitHub** in the
  dashboard, already filled into the generated snippet.
</Note>

## Authentication

Every request is authenticated with a team API key in the `Authorization` header.
See [Authentication](/api-reference/authentication).

```bash theme={null}
Authorization: Bearer cp_live_xxxxxxxxxxxx
```

## Endpoints

| Method | Path                   | Description                                   |
| ------ | ---------------------- | --------------------------------------------- |
| `POST` | `/projects/{id}/build` | [Upload a build](/api-reference/upload-build) |
| `POST` | `/projects/{id}/runs`  | [Run tests](/api-reference/run-tests)         |
| `GET`  | `/runs/{id}`           | [Get a run](/api-reference/get-run)           |

## Errors

Errors return a JSON body with an `error` message and the appropriate status code.

| Status | Meaning                                                  |
| ------ | -------------------------------------------------------- |
| `401`  | Missing or invalid API key                               |
| `402`  | Run quota exceeded for the current plan                  |
| `404`  | Project or run not found (or not owned by your team)     |
| `400`  | Bad request — e.g. no build uploaded, or no tests to run |
