# Make your first site

This page is the shortest path from a token to a live address. It uses
`curl`, so you can see each call. An agent does the same calls through the
skill or the connector.

## 1. Ask who you are

```sh
curl https://api.heyclave.party/v1/account -H "Authorization: Bearer $CLAVE_API_TOKEN"
```

The answer gives your account, what you own, and every limit that applies
to you. Read limits by lookup, not by being refused.

## 2. Make a site

```sh
curl -X POST https://api.heyclave.party/v1/sites \
  -H "Authorization: Bearer $CLAVE_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"name":"my-shop","title":"My Shop","template":"starter"}'
```

The answer gives the site id, the address the site will have, and the git
address of its source. A site with a template already has a source tree
that builds.

## 3. Write the source

Clone the source repository and edit it like any other git repository.

```sh
git clone https://api.heyclave.party/git/<site id>.git
```

Read [Site source](/concepts/source) for what the tree holds and which
files you may not change.

## 4. Publish

```sh
curl -X POST https://api.heyclave.party/v1/sites/<site id>/publish \
  -H "Authorization: Bearer $CLAVE_API_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"scope":"site"}'
```

Clave builds the source in a sandbox and puts the output live. The answer
carries a `status` and a `next_action` that says what to do next.

## 5. Look at it

The site is live on its own address. `GET /v1/sites/{id}` reports it,
along with whether the source has changes that are not published yet.

## What to do next

- Show a draft to the owner before it goes live:
  [Drafts and slots](/concepts/drafts).
- Take messages from visitors: [Forms](/concepts/forms).
- Put it on the owner's own domain: [Domains](/concepts/domains).

---

## Where this page sits

This is one page of the Clave documentation.
Read it as a web page at https://docs.heyclave.party/start/first-site.
Every page has a `.md` address, and https://docs.heyclave.party/llms.txt lists them all.

- Previous: [Get a token](https://docs.heyclave.party/start/tokens.md)
- Next: [The model](https://docs.heyclave.party/concepts/model.md)
- Index: [Overview](https://docs.heyclave.party/index.md)
