Move a template to the trash
Authorization
ApiKeyAuth API key from Settings → API Keys.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X DELETE "https://example.com/api/v1/templates/string"{ "id": "cm4tpl8e20001js04xq2v9k3m", "deleted": true}Update a template PATCH
Updates the fields present in the body and leaves everything else alone. Returns the template in the same shape as `GET`. Nothing is validated on the way in — saving work in progress has to be possible. Call `POST /api/v1/templates/{id}/validate` when you want to know whether it renders. **`archived` puts a template away, reversibly.** An archived template drops out of `GET /api/v1/templates` and changes nothing else: renders keep their files, the id keeps resolving, connected forms and live Dynamic URLs keep serving. Send `archived: false` to bring it back, and `GET /api/v1/templates?archived=true` to find it again. That is what separates it from `DELETE`, which starts a 7-day clock on the same objects.
Validate a template POST
Checks a template for problems and returns structured findings. Send `document` to check a candidate before saving it, or an empty body to check what is stored. Findings come at three severities: - **error** — the template will not render, or will render something wrong. An unavailable font silently substitutes another face; a missing image asset leaves a hole. `ok` is `false` when there is at least one. - **warning** — quality problems that still render: placeholder text left in, a real company's trademark used as sample data, a symbol set in a font that has no glyph for it. - **suggestion** — smaller improvements. Asset names and custom font families are read from the template itself, not from your request, so a filename that does not exist is caught rather than trusted. Typst **syntax** is not checked here — the compiler is the authority on that. Call `preview` to find out whether it compiles.