Skip to main content

Template Documents

Template documents are the PDF files pre-configured on a template. When an envelope is jumpstarted from the template, these documents are automatically copied into the envelope.


Properties

PropertyTypeDescription
idstringUnique identifier for the document. Required when placing fields on the template.
namestringDisplay name shown to recipients during signing.
ordernumberDisplay order when multiple documents are present. Zero-based.
pagesarrayOne entry per PDF page. The array length gives the total page count.
contextobjectArbitrary metadata attached to this document.
info

Template documents do not have a status field — status tracking applies only to documents within active envelopes.


Adding documents to a template

Documents are uploaded individually via a multipart/form-data request.

POST /api/v1/key/templates/{templateId}/documents
Content-Type: multipart/form-data
FieldTypeRequiredConstraints
documentfilePDF only. Maximum size: 48 MB.
namestringMax 140 characters. Defaults to the uploaded filename.
ordernumberDisplay position. Starts at 0.
contextobjectArbitrary metadata.

Response

{
"success": true,
"payload": {
"document": {
"id": "doc_07pq...",
"name": "NDA Template.pdf",
"order": 0,
"pages": [{}, {}, {}],
"context": {}
}
}
}

Save the document.id — you will need it when placing fields on the template.


Differences from envelope documents

Template documentEnvelope document
EndpointPOST /templates/{id}/documentsPOST /envelopes/{id}/documents
Status field❌ Not presentvoided, declined, completed
Modifiable after sendN/A — templates are static❌ Locked after envelope is sent
Copied to envelope✅ On jumpstart