# Cancel a build

> Cancel an unfinished build in your organization.

Source: https://docs.fous.com/api-reference/cancelBuild

`POST /v1/builds/{build_id}/cancel`

Authentication: `Authorization: Bearer $FOUS_API_KEY`.

## Path parameters

- `build_id` (string, required)

## Response 200

Success

- `success` (true, required)
- `data` (Build, required): A build: from queued through exploring, compiling, verifying and publishing to ready, failed or cancelled. Once ready, api names the tool and method its operation; prepared_request carries an input the builder verified it with.

## Errors

Every error uses the Error schema: branch on `error.code`. Codes are listed at https://docs.fous.com/guides/errors.

- 400
- 401 (headers: WWW-Authenticate)
- 402
- 403
- 404
- 408
- 409
- 410
- 413
- 422
- 429 (headers: Retry-After)
- 500
- 502
- 503 (headers: Retry-After)
- 504

## Example request

```bash
curl 'https://api.fous.com/v1/builds/{build_id}/cancel' \
  -X POST \
  -H "Authorization: Bearer $FOUS_API_KEY"
```
