Snapshot a document as a template
Snapshots recipients ({name, role, orderIndex}) and fields (geometry without values; per-signer assignment survives as recipientIndex) into a private template. name defaults to the document's name; category defaults to "Other".
View as MarkdownAuthorization
bearer In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/documents/string/save-as-template" \ -H "Content-Type: application/json" \ -d '{}'{ "template": { "id": "string", "name": "string", "description": "string", "category": "string", "created": "2019-08-24T14:15:22Z", "modified": "2019-08-24T14:15:22Z", "usageCount": 0, "isPublic": true, "hasFile": true, "pages": 0, "content": { "sections": [ { "heading": "string", "body": "string" } ], "placeholders": [ { "key": "string", "label": "string", "hint": "string" } ] }, "visibility": "string", "ownerId": "string", "recipients": [ { "name": "string", "role": "string", "orderIndex": 0, "isGroup": true, "groupLabel": "string" } ], "fields": [ { "type": "signature", "x": 0, "y": 0, "width": 0, "height": 0, "page": 0, "required": true, "label": "string", "recipientIndex": 0, "key": "string", "config": {} } ] }}Attach the template's PDF
Multipart upload (field "file", 25 MB max) — the document a template's fields sit on. Accepts PDF, Word (.doc/.docx), Excel (.xls/.xlsx), CSV (comma-, semicolon- or pipe-separated), PowerPoint (.ppt/.pptx), and image (JPG/PNG/GIF) files, detected from content, not the filename — anything that isn't already a PDF is converted to one server-side before it's stored. Owner-only. "Use template" copies this file into the new draft, making it ready to send.
List templates
Public templates plus the caller's own, ordered by usageCount descending. category, q and ids are optional filters. The result is paged only when limit or offset is sent (default 10, capped at 100); without either, every matching template is returned, up to 1000, and limit reports how many came back (total > that count means the list was cut off). categories always describes the full readable set regardless of the filters or page applied, so the category chips never depend on what the current page shows; total counts what the filters match, ignoring the page.