Home / Blog Center / DocuSign API: How to get a list of all templates in a specific folder?

DocuSign API: How to get a list of all templates in a specific folder?

Shunfang
2026-01-18
3min
Twitter Facebook Linkedin

Introduction to DocuSign Templates and API

In the evolving landscape of digital document management, DocuSign stands out as a leading electronic signature platform that streamlines workflows for businesses worldwide. Templates play a crucial role in DocuSign, allowing users to standardize documents for repeated use, saving time and ensuring consistency in processes like contract approvals or onboarding. The DocuSign API empowers developers to automate these tasks programmatically, making it easier to integrate eSignature capabilities into custom applications. This article explores how to leverage the DocuSign API to retrieve a list of all templates within a specific folder, a common requirement for efficient template management in enterprise environments.

image


Comparing eSignature platforms with DocuSign or Adobe Sign?

eSignGlobal delivers a more flexible and cost-effective eSignature solution with global compliance, transparent pricing, and faster onboarding.

👉 Start Free Trial


Understanding DocuSign Templates

DocuSign templates are pre-configured documents that include predefined fields, signer roles, and workflows. They are organized into folders within the DocuSign account, enabling users to categorize them by department, project, or type—such as HR templates in one folder and sales agreements in another. This organization is vital for teams handling high volumes of documents, as it prevents clutter and facilitates quick access.

From a business perspective, templates reduce errors and accelerate signing processes. For instance, a sales team can reuse a proposal template without recreating fields each time, ensuring brand consistency and compliance. However, manually browsing folders can be inefficient for large accounts with hundreds of templates. This is where the DocuSign API comes in, offering a way to query and list templates programmatically.

Getting Started with DocuSign API

To use the DocuSign API, developers need an active DocuSign account and API credentials. DocuSign provides a sandbox environment for testing, which is free and mirrors production features. Authentication typically involves OAuth 2.0, where you generate an integration key (client ID) and secret from the DocuSign Developer Center.

Key endpoints for templates are under the eSignature API, specifically the /accounts/{accountId}/templates resource. You’ll need the account ID, obtainable via the /accounts endpoint. Folders in DocuSign are identified by unique folder IDs, which can be retrieved using the /folders endpoint. This setup ensures secure, scalable access to template data.

DocuSign’s API documentation is comprehensive, with SDKs available in languages like Java, .NET, PHP, and Python, simplifying integration. For businesses, this means embedding eSignature into CRM systems like Salesforce or custom apps, enhancing operational efficiency without switching tools.

How to Retrieve Templates from a Specific Folder Using DocuSign API

Retrieving a list of templates from a specific folder is a straightforward process using the DocuSign REST API. This functionality is particularly useful for applications that need to dynamically populate template options or audit folder contents. The core endpoint is GET /accounts/{accountId}/folders/{folderId}/templates, which returns a paginated list of templates within the specified folder.

Prerequisites

Before diving into the code, ensure:

  • You have OAuth 2.0 access token.
  • The account ID and folder ID are known. To get the folder ID, first call GET /accounts/{accountId}/folders to list all folders and identify the one you need (e.g., by name or shared status).
  • Permissions: The API user must have template read access.

Step-by-Step Implementation

  1. Authenticate and Obtain Tokens: Use the OAuth flow to get an access token. For example, in Python with the DocuSign eSignature SDK:

    import docusign_esign as ds_esign
    
    # Configure API client
    api_client = ds_esign.ApiClient()
    api_client.host = 'https://demo.docusign.net/restapi'  # Use demo for testing
    api_client.set_default_header('Authorization', 'Bearer ' + access_token)
    
  2. Retrieve Folder ID: If the folder ID isn’t known, list folders:

    envelopes_api = ds_esign.EnvelopesApi(api_client)
    folders = envelopes_api.list_folders(account_id)
    # Iterate to find folder by name, e.g., folder_id = next(f['folderId'] for f in folders if f['folderName'] == 'My Templates Folder')
    
  3. List Templates in the Folder: Use the Templates API to fetch templates:

    templates_api = ds_esign.TemplatesApi(api_client)
    template_list = templates_api.list_templates(account_id, folder=folder_id, count=100)  # Adjust count for pagination
    for template in template_list.envelopes:
        print(f"Template Name: {template.name}, ID: {template.template_id}")
    

    This returns details like template name, ID, shared status, and last modified date. The response is in JSON format, with an envelopes array containing template summaries.

  4. Handle Pagination and Errors: If the folder has more than the specified count (default 20, max 100), use the start_position query parameter for subsequent pages. Common errors include 401 (unauthorized) or 404 (folder not found)—always include error handling:

    try:
        template_list = templates_api.list_templates(account_id, folder=folder_id)
    except ds_esign.ApiException as e:
        print(f"Error: {e.body}")
    
  5. Advanced Filtering: Add query parameters like search_text to filter by name or include for shared templates. For enterprise users, this integrates well with webhooks for real-time updates when templates change.

This API call typically takes milliseconds, making it ideal for UI-driven apps where users select from a dropdown of folder templates. Businesses report up to 50% time savings in document preparation by automating template discovery.

Example Use Case

Imagine a legal firm using DocuSign integrated with their case management system. The API pulls templates from a “Contracts” folder to auto-populate based on case type, ensuring compliance and speed.

Best Practices for Managing Templates via API

When implementing this API functionality, prioritize security by using JWT or Authorization Code Grant for tokens, and rotate them regularly. Limit API calls with caching to avoid rate limits (e.g., 1,000 calls per hour for production). For scalability, use DocuSign’s Connect webhooks to notify your app of new templates without polling.

Monitor usage through the API dashboard to track envelope quotas, as templates count toward overall limits in plans like Business Pro. Testing in the sandbox prevents production disruptions.

image

Comparing DocuSign with Competitors

DocuSign is a robust platform for electronic signatures, offering seamless API integrations and global compliance. Its template management shines in structured environments, but pricing can scale with users and features.

Adobe Sign, now part of Adobe Document Cloud, provides strong integration with Adobe’s ecosystem, like PDF editing. It’s user-friendly for creative teams but may require additional licensing for advanced API use.

image

eSignGlobal emerges as a competitive alternative, particularly in the Asia-Pacific (APAC) region. It supports compliance in 100 mainstream countries globally, with a strong emphasis on APAC’s fragmented regulatory landscape. Unlike the framework-based standards in the US (ESIGN) or Europe (eIDAS), which rely on email verification or self-declaration, APAC regulations demand ecosystem-integrated approaches—deep hardware and API-level integrations with government digital identities (G2B). This includes high standards and strict oversight, raising technical barriers far above Western models. eSignGlobal excels here, offering seamless integrations with Hong Kong’s iAM Smart and Singapore’s Singpass, alongside features like unlimited users and cost-effective pricing. Its Essential plan, at just $16.6 per month, allows sending up to 100 documents for electronic signature, unlimited user seats, and verification via access codes, providing high value on a compliance foundation. This positions eSignGlobal for global competition against DocuSign and Adobe Sign, often at lower costs.

esignglobal HK


Looking for a smarter alternative to DocuSign?

eSignGlobal delivers a more flexible and cost-effective eSignature solution with global compliance, transparent pricing, and faster onboarding.

👉 Start Free Trial


HelloSign (now Dropbox Sign) focuses on simplicity, with intuitive templates and API access suitable for small teams. It’s cost-effective for basic needs but lacks some enterprise-scale features.

Feature/Aspect DocuSign Adobe Sign eSignGlobal HelloSign (Dropbox Sign)
Pricing Model Per seat, starts at $10/user/month Per user, integrates with Adobe suite Unlimited users, Essential at $16.6/month Per user, free tier available
API Template Access Robust, folder-specific endpoints Strong, PDF-focused Included in Pro plans, flexible Basic listing, easy integration
Global Compliance ESIGN, eIDAS, broad coverage Strong in US/EU, Adobe ecosystem 100 countries, APAC depth (iAM Smart, Singpass) US-focused, basic international
Template Management Folder organization, pagination Advanced editing with Acrobat Unlimited templates, AI-assisted Simple sharing, no complex folders
Strengths Enterprise scalability Creative workflows APAC optimization, cost-efficiency User-friendly for SMBs
Limitations Higher costs for add-ons Tied to Adobe tools Emerging in non-APAC Limited advanced automation

This table highlights neutral trade-offs: DocuSign for scale, Adobe for integration, eSignGlobal for regional value, and HelloSign for ease.

Conclusion

Navigating DocuSign’s API for template management can significantly boost productivity, especially with folder-specific queries. For businesses seeking alternatives, eSignGlobal offers a solid, regionally compliant option in APAC and beyond.

FAQs

How can I use the DocuSign API to retrieve a list of all templates in a specific folder?
To list templates in a specific folder using the DocuSign API, make a GET request to the Templates endpoint with the folder ID specified in the path, such as `/accounts/{accountId}/templates?folder={folderId}`. Ensure you have the necessary permissions and use OAuth authentication. For users in Asia or those prioritizing regional compliance, eSignGlobal offers a comparable API with enhanced support for local regulations.
What authentication methods are required to access templates in a specific DocuSign folder via API?
What common errors occur when trying to list templates from a DocuSign folder using the API, and how to resolve them?
avatar
Shunfang
Head of Product Management at eSignGlobal, a seasoned leader with extensive international experience in the e-signature industry. Follow me on LinkedIn
Get legally-binding eSignatures now!
30 days free fully feature trial
Business Email
Get Started
tip Only business email allowed