clave docs

Deployments

Read Publishing for what a deployment is, and The publish contract for the upload flow.

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"}'

POST /v1/sites/{id}/publish builds the source and activates the result.

scope Builds
site the head of both repositories. The default.
posts the live site's commit, with the posts of now

A body that does not mention scope is a site publish.

Read them back

Call What it does
GET /v1/sites/{id}/deployments the site's deployments, newest first
GET /v1/deployments/{id} one deployment, with what changed in it

The list is paginated. Read Pagination.

A deployment reports restorable, its file count, its total bytes, and the two commits it was built from.

Restore

POST /v1/deployments/{id}/restore puts an earlier deployment back on the address.

It needs no upload. Clave holds every byte it ever published.

A restore is not a publish, and Clave's messages say so. Restoring does not move any branch in git: it changes what is served.