Finish a file upload
Authorization
ApiKeyAuth API key from Settings → API Keys.
In: header
Path Parameters
The upload_id from POST /v1/uploads.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/uploads/string/commit"{ "target": "template_docx", "template_id": "cm4tpl8e20001js04xq2v9k3m", "version": 2, "fields": [ "name", "amount" ], "added": [ "amount" ], "removed": []}Start a file upload POST
Returns a short-lived URL to post a file to, and an `upload_id` to commit it with. Use this rather than sending bytes to the API. The direct upload endpoints run as serverless functions, which reject request bodies over 4.5MB before this code sees them; here the file goes straight to storage, so the only ceiling is the 25MB we set — and it is enforced by the upload itself, so an oversized file is refused at the door rather than after it is stored. Nothing is stored against the template until you commit. An upload that is never committed expires on its own and counts against nothing. Post the file as `multipart/form-data` to `upload_url`, sending every name/value in `fields` first and the file last, in a part named `file`. `upload_with` is the complete command, already filled in.
A template's save history GET
Every saved state of a template, newest first. A version is cut on every save — an edit, a restore, or a new Word body — so this answers both "what did it look like before" and "which save broke it". Version numbers are what the restore call takes, and what a Dynamic URL pins to.