Download a Word template's body
Authorization
ApiKeyAuth API key from Settings → API Keys.
In: header
Path Parameters
Response Body
application/octet-stream
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/templates/string/docx""string"Get a template's field schema GET
The template's fields on their own, without the document body beside them. Same `fields` and `layers` as `GET /api/v1/templates/{id}`, but a document can be large and a caller that only needs to know what to put in `data` should not have to download one to find out. Add `?primary=true` for content fields only. A canvas layer carries every typography property it supports, so a five-layer template answers with 56 fields of which four are the ones anyone means. `field_count` reports both totals either way, so a filtered response never looks like the whole picture. `sample_data` is a ready-to-send `data` object built from the fields' own example values, and always contains the primary fields only.
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. Each upload is kept under its own immutable key, so earlier versions survive. Maximum 25MB.