Create Template
Create a new template with a base64-encoded PDF document. The API automatically extracts the page count from the document.
Authorizations
API key for authentication. Use your API key directly without any prefix (e.g., 'your-api-key'). Bearer prefix is optional but not required.
Body
Template name
255"Employment Contract Template"
Template description
"Standard employment contract for new hires"
Base64-encoded PDF or DOCX document. DOCX files are automatically converted to PDF. The API will automatically extract the page count from the document. For documents larger than 5 MB, use POST /documents and pass the document_id instead. (mutually exclusive with document_id and document_ids)
"JVBERi0xLjQKJeLjz9MKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAwIFIKL1Jlc291c..."
Hours until signing request expires
168
ID of a previously uploaded document (mutually exclusive with document). Obtain by calling POST /documents first.
"123e4567-e89b-12d3-a456-426614174000"
Temporary upload ids from POST /documents, in document order, to create a multi-document template (enablement required). Exactly one of document, document_id or document_ids (400 CONFLICTING_DOCUMENT_SOURCE); a repeated id answers 400 DUPLICATE_DOCUMENT_ID, more than 20 400 MAX_DOCUMENTS_EXCEEDED, an unknown or expired upload 400 DOCUMENT_UPLOAD_NOT_FOUND, a set above 100 MB 413 DOCUMENT_SET_TOO_LARGE.
1 - 20 elementsResponse
Template created successfully
Unique identifier for the template
Template name
255Template creation timestamp
Template description
Pre-signed URL to the PDF document. This is a time-limited signed URL for secure access - see document_url_expires_at for expiration time. Initial URLs are valid for 7 days; refreshed URLs are valid for 1 hour. Request a new template retrieval to get a fresh URL if expired.
ISO 8601 timestamp when the document_url will expire. After this time, the URL will return an access denied error. Fetch the template again to receive a fresh signed URL.
Number of pages in the document
x >= 1Hours until signing requests created from this template expire
x >= 1Number of credits consumed when a signing request is sent from this template. Minimum value is 1.
x >= 1Settings returned by the signing request list and detail endpoints. Templates use the TemplateSettings schema (no identity fields).
Template recipients (included in GET single template)
Template fields (included in GET single template)
Template last update timestamp
The template's documents in position order (multi-document; present only for companies enabled for it). On GET /templates (the list): A list entry carries no document_url. A parent whose document set has never been changed lists documents: [] here, while its single-resource GET answers its one document (with document_id null). On GET /templates/{id}, PUT /templates/{id} and POST /templates: A parent whose document set has never been changed answers its one document, with document_id null.
Version of the document set, raised by every document change (multi-document; enabled companies only).
Version of the document layout, raised when documents are added, removed or reordered (multi-document; enabled companies only). Field writes on a signing request with more than one document send it back as documents_layout_version.