List a template's assets
Authorization
ApiKeyAuth API key from API Keys in the dashboard menu.
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/templates/string/assets"{ "assets": [ { "id": "cm4ast8e20001js04xq2v9k3m", "filename": "logo.png", "type": "image", "content_type": "image/png", "size": 18422, "url": "https://docuagen.s3.amazonaws.com/...?X-Amz-Signature=...", "self": "https://automette.com/api/v1/templates/cm4tpl.../assets/cm4ast...", "created_at": "2026-08-20T09:00:00.000Z" } ]}Upload or replace a Word template's body PUT
Send `multipart/form-data` with a `file` part, JSON `{ "content_base64": "..." }`, or the raw bytes. Raw bytes are accepted under any content type that is not multipart or JSON, including the real DOCX type (`application/vnd.openxmlformats-officedocument.wordprocessingml.document`), which is what `curl --data-binary` sends. The file is parsed before it is stored, so a .docx the renderer cannot read is rejected with 422 rather than becoming a template that fails at render time. The response reports which fields the upload `added` and `removed`, so a replacement that quietly drops a variable is visible. `version` is the TEMPLATE version this upload created: the number that appears in the history and that restore and Dynamic URL pinning take. `docx_version` counts .docx bodies and is a different, lower number; do not feed it to restore. Each upload is kept under its own immutable key, so earlier versions survive. **Maximum 4.5MB on this endpoint.** It runs as a serverless function, and the platform rejects larger request bodies before this code sees them. For anything bigger, or from an agent that would otherwise have to encode the file itself, use `POST /v1/uploads`, which returns a URL the file is posted to directly and allows 25MB.
Upload a template asset POST
Uploads an image or font. Send `multipart/form-data` with a `file` part, or JSON with `filename` and `content_base64` if building a multipart request is awkward. Uploading a filename that already exists **replaces** it in place rather than adding a second copy: a template refers to its assets by name, so re-uploading `logo.png` updates the one the document already points at. How you then reference the file depends on the engine. Typst uses the bare filename: `#image("logo.png")`. Canvas stores the full S3 key in the component's `src`, which is why the response returns `file_key` as well as a URL. Maximum 25MB per file. Uploads count toward your plan's storage limit.