---
title: "POST /api/v1/docs-sites/{spaceId}/builds"
method: POST
path: "/api/v1/docs-sites/{spaceId}/builds"
---

# POST /api/v1/docs-sites/{spaceId}/builds

`POST /api/v1/docs-sites/{spaceId}/builds`

## Request

- Base URL: `https://falconer.com` (the document declares no server; this is the origin it was published from)
- URL: `https://falconer.com/api/v1/docs-sites/{spaceId}/builds`
- Auth: none declared

## Path parameters

- `spaceId` integer, required: Space id, from GET /spaces.

## Headers

- `x-organization-id` string: Required when using OAuth bearer tokens.

## Request body

- TriggerDocsBuildRequest
  - `autoPublish` boolean: Publish as soon as the build succeeds. Requires public docs management.

## Response `202`

Release build queued, or the matching build already in the queue.

- DocsBuild, nullable
  - `id` string, required
  - `buildNumber` integer, nullable, required
  - `status` 'queued' | 'building' | 'succeeded' | 'failed', required
  - `indexStatus` 'pending' | 'indexing' | 'ready' | 'failed', required: Search indexing of the build; meaningful once status is succeeded.
  - `error` string, nullable, required
  - `indexError` string, nullable, required
  - `autoPublish` boolean, required
  - `isPublished` boolean, required: Whether this build is the one the live site serves.
  - `staleSubdomain` boolean, required: Built before the site was renamed, so its canonical URLs and sitemap point at the old host. Publishing it serves stale URLs until a rebuild.
  - `requestedBy` object, nullable, required
    - `id` string, required
    - `name` string, nullable, required
  - `createdAt` string, required
  - `completedAt` string, nullable, required
  - `publicUrl` string, required
  - `edgeOutcome` 'propagating' | 'confirmed' | 'unconfirmed' | 'failed', nullable, required: Publish propagation state; set only on the build the site points at.
  - `edgeError` string, nullable, required

## Other responses

- `400`: Bad request
- `403`: Public docs are not enabled or permission is missing
- `404`: Docs site or build not found

---

[API](https://skmtc.dev/falconer/apis/falconer-public-api.md) · [All operations](https://skmtc.dev/falconer/apis/falconer-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/falconer/apis/falconer-public-api/revisions/c00420511526?raw)
