clave docs

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

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

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.

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

Read Site source for what the tree holds and which files you may not change.

4. Publish

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