Using Templates
Templates let you create documents without configuring fields and layout every time. Design a template once in the dashboard with placed fields and signer slots, then use the API to generate documents from it with real signer data.
When to use templates
Section titled “When to use templates”- Standardized documents — NDAs, contracts, onboarding forms that follow the same layout
- High-volume workflows — Sending the same document to many different recipients
- Non-technical users — Let your team design templates in the visual editor, while developers use the API
Creating a template
Section titled “Creating a template”Templates are created in the inSigner dashboard:
- Go to Dashboard → Templates.
- Upload a PDF file.
- Use the visual field editor to place signature fields, text inputs, dates, etc.
- Define signer slots (e.g. “Client”, “Witness”).
- Save the template.
Once saved, the template is available via the API.
Using a template via API
Section titled “Using a template via API”Step 1: Find the template
Section titled “Step 1: Find the template”List your templates and note the id:
curl -X GET "https://app.insigner.co/api/v1/templates?search=NDA" \ -H "Authorization: Bearer isk_YOUR_API_KEY"Step 2: Create a document
Section titled “Step 2: Create a document”Use the template’s id to create a document with real signer details:
curl -X POST https://app.insigner.co/api/v1/templates/tpl_abc123/use \ -H "Authorization: Bearer isk_YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "name": "NDA - Acme Corp & WidgetCo", "signers": [ { "email": "[email protected]", "name": "Alice Johnson" }, { "email": "[email protected]", "name": "Bob Williams" } ] }'const { data: doc } = await insignerFetch('/templates/tpl_abc123/use', { method: 'POST', body: JSON.stringify({ name: 'NDA - Acme Corp & WidgetCo', signers: [ ] })});console.log(`Document created: ${doc.id}`);res = insigner_request("POST", "/templates/tpl_abc123/use", json={ "name": "NDA - Acme Corp & WidgetCo", "signers": [ ]})doc_id = res["data"]["id"]print(f"Document created: {doc_id}")Step 3: Send immediately
Section titled “Step 3: Send immediately”Since the template already has fields and the signers are filled in:
curl -X POST https://app.insigner.co/api/v1/documents/cm5x9ghi789/send \ -H "Authorization: Bearer isk_YOUR_API_KEY"End-to-end example
Section titled “End-to-end example”Here’s the complete flow — find a template, create a document, and send it:
async function sendFromTemplate(templateId, signers) { // Create document from template const { data: doc } = await insignerFetch(`/templates/${templateId}/use`, { method: 'POST', body: JSON.stringify({ signers }) });
// Send immediately await insignerFetch(`/documents/${doc.id}/send`, { method: 'POST' });
return doc.id;}
// Usageconst docId = await sendFromTemplate('tpl_abc123', []);console.log(`Sent document: ${docId}`);def send_from_template(template_id, signers): # Create document from template res = insigner_request("POST", f"/templates/{template_id}/use", json={ "signers": signers }) doc_id = res["data"]["id"]
# Send immediately insigner_request("POST", f"/documents/{doc_id}/send") return doc_id
# Usagedoc_id = send_from_template("tpl_abc123", [])print(f"Sent document: {doc_id}")