Automette docs

Create a template

POST
/api/v1/templates

Authorization

ApiKeyAuth
AuthorizationBearer <token>

API key from Settings → API Keys.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/templates" \  -H "Content-Type: application/json" \  -d '{    "from_library": "invoice-minimal",    "name": "Acme invoice"  }'
{  "id": "string",  "name": "string",  "engine": "typst",  "default_formats": [    "string"  ],  "allowed_formats": [    "string"  ],  "self": "http://example.com",  "created_at": "2019-08-24T14:15:22Z",  "updated_at": "2019-08-24T14:15:22Z"}

List templates GET

Returns all templates in your team, ordered by creation date ascending. Use the `engine` filter to narrow to a specific template type. Templates are created and edited in the dashboard — this endpoint is read-only.

Get a template GET

Returns a single template including its `document` and its `fields` — the keys you can pass in the `data` object of `POST /api/v1/renders`. `document` is the template itself: Typst source, or the canvas document as a JSON string. It is here because `PATCH` takes a whole document, so editing is read-change-write. If you only need the field schema, `GET /api/v1/templates/{id}/fields` skips the body. Each field carries `primary`: `true` for content (the reason the field exists), `false` for styling. If you are building a form or an integration, show the primary fields and put the rest behind a "show all" toggle. **Field schema by engine:** - **Typst** — keys extracted from the template source: `{ key, type: "text", example, primary: true }` where `example` is the placeholder value in the source. - **Canvas** — one entry per settable layer property, keyed `layerName.property`: `{ key, label, type, example, primary }`. - **DOCX** — the template's authored field definitions with richer metadata: `{ key, label, type, required, primary: true }` where `type` is one of `text`, `date`, `number`, or `array`. **Canvas templates also return `layers`** — the same properties grouped by the layer they belong to, which is how the template is actually built. Each property carries the full dotted `key` to send in `data`, so you never have to build it yourself. Not every visual attribute is settable. Position, size, rotation, opacity and font size are design-time only: they are changed in the template editor, and are absent from both `fields` and `layers`. Sending them in `data` has no effect. Also returns `url_base` — the template's on-demand URL token, or `null` if not generated yet. See [On-demand URLs](/docs/api/on-demand-urls). > `available_fields` is a deprecated alias for `fields` and will be removed. Use `fields`.