Download a Word template's body
Authorization
ApiKeyAuth API key from API Keys in the dashboard menu.
In: header
Path Parameters
Query Parameters
Read this saved version instead of the current one. Changes nothing.
Response Body
application/octet-stream
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/templates/string/docx""string"Restore a previous version POST
Put the template back to how it was at a given version. Restoring appends rather than rewrites: the old content becomes a NEW version at the top of the history, so going back never destroys anything and undoing a restore is just another restore.
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.