Skip to Content

Create Template

Creates a new reusable template in DocuSign programmatically. Templates define document structure, fields, and roles that can be reused for multiple envelopes.

Overview

  • Purpose: Programmatically create reusable document templates with predefined fields and roles.
  • Use Cases: Automating template creation, migrating templates between accounts, creating templates from user-uploaded documents.
  • API Method: POST /templates
  • Alternative: Most users create templates manually in DocuSign UI for easier field placement.

Required Input Fields

Name: Template name for identification in DocuSign.

Email Subject: Default email subject line for envelopes created from this template.

Documents: Array of document objects with base64-encoded content.

Recipients: Object defining roles (not specific people) who will interact with the template.

Document Configuration

  • Document ID: Unique identifier for the document within the template.
  • Name: Document display name.
  • Document Base64: Base64-encoded document content.
  • File Extension: File type (e.g., ‘pdf’, ‘docx’).

Recipients and Roles

  • Role Name: Generic role identifier (e.g., ‘Client’, ‘Employee’, ‘Manager’) - not a specific person’s name.
  • Routing Order: Order in which roles will receive the document for signing.
  • Tabs: Define field positions, types, and properties (signature fields, text fields, checkboxes, etc.).

Tab Configuration

  • Tab Types: signHereTabs, textTabs, dateSignedTabs, checkboxTabs, numberTabs, emailTabs.
  • Tab Label: Unique identifier for the field within the document.
  • Position: X and Y coordinates, page number, and document ID for field placement.
  • Required: Whether the field must be filled before signing.
  • Note: Precise positioning is required - consider using DocuSign UI for easier setup.

Optional Input Fields

Description: Template description for documentation purposes.

Locked Fields: Mark fields as locked to prevent modification.

Default Values: Set default values for text fields.

Output

  • Template ID: Unique identifier for the created template - use this with ‘Create Envelope from Template’.
  • Name: Template name.
  • URI: DocuSign URI for accessing the template.

Tips

[!WARNING] Creating templates via API requires precise tab positioning - consider using DocuSign UI instead

[!TIP] Use ‘List Templates’ to get template IDs after manual creation in DocuSign

[!TIP] Test templates thoroughly before using in production workflows

[!TIP] Role names should be generic (e.g., ‘Signer’) not specific names (e.g., ‘John Smith’)

[!TIP] Save the returned template ID for use with ‘Create Envelope from Template’

[!TIP] Document coordinates are in pixels from top-left corner of the page

Need help? Have feedback?