Automette docs

Delete a form

DELETE
/api/v1/forms/{id}

Authorization

ApiKeyAuth
AuthorizationBearer <token>

API key from Settings → API Keys.

In: header

Path Parameters

id*string

Query Parameters

permanent?"1"

Set to 1 to delete outright rather than trash. Irreversible, and takes the responses with it.

Value in

  • "1"

Response Body

application/json

application/json

application/json

curl -X DELETE "https://example.com/api/v1/forms/string"
{  "ok": true,  "id": "cm4frm2xy0001kp04a7c9v1de",  "permanent": false}

Update a form PATCH

Content keys (`title`, `description`, `submit_label`, `captcha`, `fields`) edit the **draft** — respondents keep seeing the published version until you publish again, the same rule the builder follows. Operational keys (`closed`, `closed_message`, `archived`, `password`) take effect immediately, because closing or protecting a form is not a new version of it. Send only the keys you are changing. `fields`, when sent, is the complete list you want the form to have: - a field whose `key` you send again is updated in place, keeping its identity and its answers' history; - a `key` the form does not have yet is added at the end; - a `key` you leave out is removed, along with any conditional logic that depended on it — **unless** it is a question this API cannot create, which is kept instead; - a property you leave out is cleared, so a field sent with no `placeholder` ends up with none; - **the order of the array is the order respondents see**, so moving a question is a matter of moving it in the list. That last rule is what makes the round trip safe: `GET` a form, change one label, `PATCH` the whole `fields` array back, and nothing built in the dashboard is lost. Anything the update did beyond what you asked for comes back in `warnings`. Layout authored in the builder survives — extra pages, prose between questions, columns. Only the questions themselves change, and reordering rewrites only the slots that already hold questions, so headings between them stay put. A form whose questions sit inside a column layout is left in its existing order and says so in `warnings`: a flat list cannot describe where a question belongs in a grid.

Publish a form POST

Freezes the current draft as a new immutable version and puts it live, returning the URLs you need to embed it. Call it again after any `PATCH` to roll those edits out; each call increments `version`. Published versions are never mutated, so submissions always resolve against the exact form that was filled in.