Automette docs

Templates

Two read endpoints for templates. Templates are created and edited in the dashboard; the API is read-only.

List templates

GET /api/v1/templates
Authorization: Bearer dg_your_api_key

Query parameters

ParamTypeDescription
enginestringFilter by typst, canvas, or docx. Any other value returns 422.

Response — 200

[
  {
    "id": "cm4tpl8e20001js04xq2v9k3m",
    "name": "Invoice",
    "engine": "typst",
    "self": "https://automette.com/api/v1/templates/cm4tpl8e20001js04xq2v9k3m",
    "created_at": "2026-04-01T09:00:00.000Z",
    "updated_at": "2026-04-22T11:00:00.000Z"
  }
]

Returned in ascending creation order.

Get a template

GET /api/v1/templates/{id}
Authorization: Bearer dg_your_api_key

Response — 200

{
  "id": "cm4tpl8e20001js04xq2v9k3m",
  "name": "Invoice",
  "engine": "typst",
  "available_fields": [
    { "key": "name",   "type": "text", "example": "Alice" },
    { "key": "amount", "type": "text", "example": "1,200" },
    { "key": "date",   "type": "text", "example": "2026-04-22" }
  ],
  "url_base": "Yx4kPz8qWm2nRv6t",
  "created_at": "2026-04-01T09:00:00.000Z",
  "updated_at": "2026-04-22T11:00:00.000Z"
}

Field notes:

  • available_fields — the keys you can pass in the data object of POST /api/v1/renders.
    • Typst / Canvas — keys extracted from the template source: { key, type: "text", example }, where example is the placeholder value from the source.
    • DOCX — the template's authored field definitions, with richer metadata: { key, label, type, required }, where type is one of text, date, number, or array.
  • url_base — the template's on-demand URL token, or null if not generated yet. See On-demand URLs.

For a DOCX template the response looks like:

"available_fields": [
  { "key": "candidate_name", "label": "Candidate Name", "type": "text",   "required": true,  "example": "" },
  { "key": "start_date",     "label": "Start Date",     "type": "date",   "required": true,  "example": "" },
  { "key": "annual_salary",  "label": "Annual Salary",  "type": "number", "required": true,  "example": "" },
  { "key": "benefits",       "label": "Benefits",       "type": "array",  "required": false, "example": "" }
]

Errors

CodeWhen
401Missing or invalid API key
404Template does not exist or is not in your team

Example — discover fields before rendering

# Step 1: find the template ID
curl https://automette.com/api/v1/templates \
  -H "Authorization: Bearer dg_your_key" | jq '.[] | select(.name=="Invoice") | .id'

# Step 2: inspect the field keys
curl https://automette.com/api/v1/templates/cm4tpl8e20001js04xq2v9k3m \
  -H "Authorization: Bearer dg_your_key" | jq '.available_fields[].key'

# Step 3: render with those keys
curl -X POST https://automette.com/api/v1/renders \
  -H "Authorization: Bearer dg_your_key" \
  -H "Content-Type: application/json" \
  -d '{"template_id":"cm4tpl8e20001js04xq2v9k3m","data":{"name":"Alice","amount":"1200","date":"2026-04-22"}}'

On this page