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

# Publish the draft

> 400 no_draft when nothing is saved.

`400 no_draft` when nothing is saved.

### Path parameters

<ParamField path="id" type="string" required>
  Site id
</ParamField>

### Response

`object`

<ResponseField name="version" type="integer" required />

<ResponseField name="config" type="object" required>
  The site's widget settings — free-form, whatever the editor saved
</ResponseField>

<ResponseField name="publishedAt" type="string (date-time)">
  `null` until published
</ResponseField>

### Status codes

| Code  | Meaning              |
| ----- | -------------------- |
| `200` | The published config |
| `400` | Error                |
| `401` | Error                |
| `404` | Error                |

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.example.com/api/admin/sites/{id}/config/publish' \
    --header 'Authorization: Bearer YOUR_API_KEY'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "version": 1,
    "config": {},
    "publishedAt": "2026-08-31T14:22:05Z"
  }
  ```
</ResponseExample>
