> ## 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.

# Quickstart

> Publish your first page from code or an agent, in under a minute.

<Note>
  This is the **developer** path (REST API + MCP). Just want to share a page without
  code? Head to [Using Shareable → Publish a page](/guides/publish-a-page).
</Note>

## 1. Get an API key

Sign in at [useshareable.com](https://useshareable.com), open **Developers**, and create a key. Copy it — it starts with `sm_` and is shown only once.

<Warning>
  Treat your key like a password. It can publish, update, and set access on pages in your account.
</Warning>

## 2. Publish a page

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://useshareable.com/api/v1/pages \
    -H "Authorization: Bearer sm_your_key" \
    -H "Content-Type: application/json" \
    -d '{
      "html": "<!doctype html><h1>Hello from Shareable</h1>",
      "title": "My first page",
      "access": "link"
    }'
  ```

  ```javascript Node theme={null}
  const res = await fetch("https://useshareable.com/api/v1/pages", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.SHAREABLE_API_KEY}`,
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      html: "<!doctype html><h1>Hello from Shareable</h1>",
      title: "My first page",
      access: "link",
    }),
  })
  const { data } = await res.json()
  console.log(data.url) // → https://useshareable.com/p/...
  ```
</CodeGroup>

The response contains your live URL:

```json theme={null}
{
  "data": {
    "id": "…",
    "slug": "my-first-page-k3f9d2a8xq4p",
    "url": "https://useshareable.com/p/my-first-page-k3f9d2a8xq4p",
    "access": "link",
    "is_published": true,
    "has_unpublished_changes": false
  }
}
```

## 3. Or publish straight from your agent

If you use Claude Code (or any MCP client), skip the API and let your agent do it. See the [MCP server](/mcp-server) guide:

```text theme={null}
"Publish this dashboard and make it shareable with anyone who has the link."
```

<Card title="Next: the publishing & access model" icon="arrow-right" href="/publishing-and-access">
  Understand drafts vs. published versions and the three access levels.
</Card>
