---
title: "Start a deploy"
---

`POST https://app.specly.xyz/api/sites/{id}/deploy`

Builds the site's docs from its docs branch and publishes them. The build runs after the call returns: follow
it at the `url` in the response. Needs a key with the `deploy` scope. A key may start 10 deploys a minute.

## Authorization

- `Authorization` (header): Bearer token

## Path parameters

- `id` (string, required): The site's ID, which is in its dashboard address.

## Responses

### 202

The build has started.

`application/json`

- `build` (object, required)
  - `id` (string, required): The build's ID.
  - `url` (string, required): The build's page in the dashboard.

### 401

The key is missing, malformed, unknown or revoked.

`application/json`

- `error` (string, required): What went wrong.

### 403

The key can't be used on this site, or doesn't have the scope this call needs.

`application/json`

- `error` (string, required): What went wrong.

### 429

Too many requests from your address, or with this key. Wait a minute.

`application/json`

- `error` (string, required): What went wrong.

## Example request

```bash
curl --request POST \
  --url 'https://app.specly.xyz/api/sites/{id}/deploy' \
  --header 'Authorization: Bearer <token>'
```

## Example response (202)

```json
{
  "build": {
    "id": "5b0e6c3a-1f4d-4c1e-9a53-0d8f6f2f7a10",
    "url": "https://app.specly.xyz/sites/2f6c1b8e-7d3a-4e55-b1c9-3a9d0c4e8f12/deploys/5b0e6c3a-1f4d-4c1e-9a53-0d8f6f2f7a10"
  }
}
```
