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

# Publishing

> Push a draft live, or take a page offline.

Publishing copies a page's current **draft** to its **published** version (what visitors see). See [publishing & access](/publishing-and-access) for the model.

## Publish a page

<code>POST /api/v1/pages/{id}/publish</code>

Copies the current draft to the live version. Use this after updating a page's HTML to push the changes live.

```bash theme={null}
curl -X POST https://useshareable.com/api/v1/pages/PAGE_ID/publish \
  -H "Authorization: Bearer sm_your_key"
```

Returns:

```json theme={null}
{
  "data": {
    "id": "…",
    "url": "https://useshareable.com/p/…",
    "is_published": true,
    "has_unpublished_changes": false
  }
}
```

## Unpublish a page

<code>DELETE /api/v1/pages/{id}/publish</code>

Takes the page offline — the URL stops serving content (visitors get a "not published" notice) and the draft is preserved. Re-publish anytime.

```bash theme={null}
curl -X DELETE https://useshareable.com/api/v1/pages/PAGE_ID/publish \
  -H "Authorization: Bearer sm_your_key"
```

Returns:

```json theme={null}
{ "data": { "is_published": false } }
```
