clave docs

Forms

Read Forms for the two halves of a form and the rule about where mail goes.

Declare one

A form is declared in the site's clave.site.json, under forms, and a publish makes it. Read Forms. The API reads forms and does not change them.

Call What it does
GET /v1/sites/{id}/forms the site's forms
GET /v1/forms/{id} one form

The answer carries the form's action_url. Put that in the site's HTML. That address is baked into published pages, so it keeps working whatever else moves.

To turn a form off, remove it from the file and publish. It takes no more messages and keeps what it received.

Where mail goes

notify_to must be an address on the account: the owner's, or a collaborator's.

Every surface reports notify_options with the legal values. A solo owner has exactly one — the address they sign in with.

Read the enquiries

GET /v1/forms/{id}/submissions lists what came through, newest first. It is paginated; read Pagination.

?format=csv exports the same list as a file.

?slot=1 lists the test messages sent on the site's draft. Without it the list is the live site's. The connector's list_submissions takes slot the same way.

Submissions are kept for 180 days.

What forms need

Forms need a Turnstile key on the deployment. Without one Clave advertises no form tools at all.

Mail needs a configured sender. Without one an enquiry is stored and not mailed, and Clave says so rather than pretend.