docuseal Documentation

Open source DocuSign alternative. Create, fill, and sign digital documents ✍️

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy docuseal on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name docuseal -p 3000:3000 --restart always docuseal/docuseal:latest
Configured Services & Ports
⚙️ app
image: docuseal/docuseal:latest
🔌 Ports: 3000:3000
⚙️ postgres
image: postgres:18
⚙️ caddy
image: caddy:latest
🔌 Ports: 80:80, 443:443, 443:443/udp
docker-compose.yml
yaml (docker-compose.yml)
services:
  app:
    depends_on:
      postgres:
        condition: service_healthy
    image: docuseal/docuseal:latest
    ports:
      - 3000:3000
    volumes:
      - ./docuseal:/data/docuseal
    environment:
      - FORCE_SSL=${HOST}
      - DATABASE_URL=postgresql://postgres:postgres@postgres:5432/docuseal

  postgres:
    image: postgres:18
    volumes:
      - './pg_data:/var/lib/postgresql/18/docker'
    environment:
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      POSTGRES_DB: docuseal
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 5s
      timeout: 5s
      retries: 5

  caddy:
    image: caddy:latest
    command: caddy reverse-proxy --from $HOST --to app:3000
    ports:
      - 80:80
      - 443:443
      - 443:443/udp
    volumes:
      - ./caddy:/data/caddy
    environment:
      - HOST=${HOST}

File: README.md

text
<a href="https://www.docuseal.com">
  
  
</a>
DocuSeal

Open source document filling and signing

DocuSeal is an open source platform that provides secure and efficient digital document signing and processing. Create PDF forms to have them filled and signed online on any device with an easy-to-use, mobile-optimized web tool.

[✨ Live Demo](https://demo.docuseal.tech) | [☁️ Try in Cloud](https://docuseal.com/sign_up)

Features

  • PDF form fields builder (WYSIWYG)
  • 12 field types available (Signature, Date, File, Checkbox etc.)
  • Multiple submitters per document
  • Automated emails via SMTP
  • Files storage on disk or AWS S3, Google Storage, Azure Cloud
  • Automatic PDF eSignature
  • PDF signature verification
  • Users management
  • Mobile-optimized
  • 7 UI languages with signing available in 14 languages
  • API and Webhooks for integrations
  • Easy to deploy in minutes

Pro Features

  • Company logo and white-label
  • User roles
  • Automated reminders
  • Invitation and identity verification via SMS
  • Conditional fields and formulas
  • Bulk send with CSV, XLSX spreadsheet import
  • SSO / SAML
  • Template creation with HTML API (Guide)
  • Template creation with PDF or DOCX and field tags API (Guide)
  • Embedded signing form (React, Vue, Angular or JavaScript)
  • Embedded document form builder (React, Vue, Angular or JavaScript)
  • Learn more

Deploy

Heroku Railway
DigitalOcean Render

Docker

sh
docker run --name docuseal -p 3000:3000 -v.:/data docuseal/docuseal

By default DocuSeal docker container uses an SQLite database to store data and configurations. Alternatively, it is possible to use PostgreSQL or MySQL databases by specifying the DATABASE_URL env variable.

Docker Compose

Download docker-compose.yml into your private server:

sh
curl https://raw.githubusercontent.com/docusealco/docuseal/master/docker-compose.yml > docker-compose.yml

Run the app under a custom domain over https using docker compose (make sure your DNS points to the server to automatically issue ssl certs with Caddy):

sh
sudo HOST=your-domain-name.com docker compose up

For Businesses

Integrate seamless document signing into your web or mobile apps with DocuSeal

At DocuSeal we have expertise and technologies to make documents creation, filling, signing and processing seamlessly integrated with your product. We specialize in working with various industries, including Banking, Healthcare, Transport, Real Estate, eCommerce, KYC, CRM, and other software products that require bulk document signing. By leveraging DocuSeal, we can assist in reducing the overall cost of developing and processing electronic documents while ensuring security and compliance with local electronic document laws.

Book a Meeting

License

Distributed under the AGPLv3 License with Section 7(b) Additional Terms. See LICENSE and LICENSE_ADDITIONAL_TERMS for more information.
Unless otherwise noted, all files © 2023-2026 DocuSeal LLC.

Tools


File: docs/embedding/form-builder-angular.md

Angular Form Builder

Example Code

angular
import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { DocusealBuilderComponent } from '@docuseal/angular';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [DocusealBuilderComponent],
  template: `
    
      <ng-container *ngIf="token">
        <docuseal-builder [token]="token"></docuseal-builder>
      </ng-container>
    
  `
})
export class AppComponent implements OnInit {
  token: string = ''

  constructor(private http: HttpClient) {}

  ngOnInit() {
    this.http.post('/api/docuseal/builder_token', {}).subscribe((data: any) => {
      this.token = data.token;
    });
  }
}
javascript
const jwt = require('jsonwebtoken');

const token = jwt.sign({
  user_email: '{{admin_user_email}}',
  integration_email: '{{signer_email}}',
  external_id: 'TestForm123',
  name: 'Integration W-9 Test Form',
  document_urls: ['https://www.irs.gov/pub/irs-pdf/fw9.pdf'],
}, '{{api_key}}');

Attributes

text
/* Detailed source-code truncated for AI context efficiency. */

Callback

json
{
  "onLoad": {
    "type": "event emitter",
    "required": false,
    "description": "Event emitted on loading the form builder template data.",
    "example": "handleLoad($event)"
  },
  "onUpload": {
    "type": "event emitter",
    "required": false,
    "description": "Event emitted on uploading a document to the template.",
    "example": "handleUpload($event)"
  },
  "onSend": {
    "type": "event emitter",
    "required": false,
    "description": "Event emitted on sending documents for signature to recipients.",
    "example": "handleSend($event)"
  },
  "onChange": {
    "type": "function",
    "required": false,
    "description": "Function to be called when changes are made to the template form.",
    "example": "handleChange($event)"
  },
  "onSave": {
    "type": "event emitter",
    "required": false,
    "description": "Event emitted on saving changes of the template form.",
    "example": "handleSave($event)"
  }
}

File: docs/embedding/form-builder-javascript.md

JavaScript Form Builder

Example Code

javascript
<script src="https://docuseal.com/js/builder.js"></script>

<docuseal-builder
  data-token="<%= JWT.encode({
    user_email: '{{admin_user_email}}',
    integration_email: '{{signer_email}}',
    name: 'Integration W-9 Test Form',
    document_urls: ['https://www.irs.gov/pub/irs-pdf/fw9.pdf'],
  }, '{{api_key}}') %>">
</docuseal-builder>

Attributes

text
/* Detailed source-code truncated for AI context efficiency. */

Callback

json
{
  "load": {
    "type": "event",
    "required": false,
    "description": "Custom event to be triggered on loading the form builder template data.",
    "example": "document.querySelector('docuseal-builder').addEventListener('load', (e) => e.detail)"
  },
  "upload": {
    "type": "event",
    "required": false,
    "description": "Custom event to be triggered on uploading a document to the template.",
    "example": "document.querySelector('docuseal-builder').addEventListener('upload', (e) => e.detail)"
  },
  "send": {
    "type": "event",
    "required": false,
    "description": "Custom event to be triggered on sending documents for signature to recipients.",
    "example": "document.querySelector('docuseal-builder').addEventListener('send', (e) => e.detail)"
  },
  "change": {
    "type": "event",
    "required": false,
    "description": "Custom event to be triggered every time a change to the template is made.",
    "example": "document.querySelector('docuseal-builder').addEventListener('change', (e) => e.detail)"
  },
  "save": {
    "type": "event",
    "required": false,
    "description": "Custom event to be triggered on saving changes of the template form.",
    "example": "document.querySelector('docuseal-builder').addEventListener('save', (e) => e.detail)"
  }
}

File: docs/embedding/form-builder-react.md

React Form Builder

Example Code

react
import React, { useState, useEffect } from 'react';
import { DocusealBuilder } from '@docuseal/react'

const App = () => {
  const [token, setToken] = useState();

  useEffect(() => {
    fetch('/api/docuseal/builder_token', {
      method: 'POST',
    })
      .then((response) => response.json())
      .then((data) => {
        setToken(data.token);
      });
  }, []);

  return token && <DocusealBuilder token={token} />;
};
javascript
const jwt = require('jsonwebtoken');

const token = jwt.sign({
  user_email: '{{admin_user_email}}',
  integration_email: '{{signer_email}}',
  external_id: 'TestForm123',
  name: 'Integration W-9 Test Form',
  document_urls: ['https://www.irs.gov/pub/irs-pdf/fw9.pdf'],
}, '{{api_key}}');

Attributes

text
/* Detailed source-code truncated for AI context efficiency. */

Callback

json
{
  "onLoad": {
    "type": "function",
    "required": false,
    "description": "Function to be called on loading the form builder template data.",
    "example": "(data) => { console.log(data) }"
  },
  "onUpload": {
    "type": "function",
    "required": false,
    "description": "Function to be called on uploading a document to the template.",
    "example": "(data) => { console.log(data) }"
  },
  "onSend": {
    "type": "function",
    "required": false,
    "description": "Function to be called on sending documents for signature to recipients.",
    "example": "(data) => { console.log(data) }"
  },
  "onChange": {
    "type": "function",
    "required": false,
    "description": "Function to be called when changes are made to the template form.",
    "example": "(data) => { console.log(data) }"
  },
  "onSave": {
    "type": "function",
    "required": false,
    "description": "Function to be called on saving changes of the template form.",
    "example": "(data) => { console.log(data) }"
  }
}

File: docs/embedding/form-builder-vue.md

Vue Form Builder

Example Code

vue
<template>
  <DocusealBuilder
    v-if="token"
    :token="token"
  />
</template>

<script>
import { DocusealBuilder } from '@docuseal/vue'

export default {
  name: 'App',
  components: { DocusealBuilder },
  data () {
    return { token: '' }
  },
  mounted () {
    fetch('/api/docuseal/builder_token', {
      method: 'POST'
    }).then(async (resp) => {
      const data = await resp.json()

      this.token = data.token
    })
  }
}
</script>
javascript
const jwt = require('jsonwebtoken');

const token = jwt.sign({
  user_email: '{{admin_user_email}}',
  integration_email: '{{signer_email}}',
  external_id: 'TestForm123',
  name: 'Integration W-9 Test Form',
  document_urls: ['https://www.irs.gov/pub/irs-pdf/fw9.pdf'],
}, '{{api_key}}');

Attributes

text
/* Detailed source-code truncated for AI context efficiency. */

Callback

json
{
  "@load": {
    "type": "function",
    "required": false,
    "description": "Function to be called on loading the form builder template data.",
    "example": "onBuilderLoad"
  },
  "@upload": {
    "type": "function",
    "required": false,
    "description": "Function to be called on uploading a document to the template.",
    "example": "onBuilderUpload"
  },
  "@send": {
    "type": "function",
    "required": false,
    "description": "Function to be called on sending documents for signature to recipients.",
    "example": "onBuilderSend"
  },
  "@change": {
    "type": "function",
    "required": false,
    "description": "Function to be called when changes are made to the template form.",
    "example": "onBuilderChange"
  },
  "@save": {
    "type": "function",
    "required": false,
    "description": "Function to be called on saving changes of the template form.",
    "example": "onBuilderSave"
  }
}

File: docs/embedding/signing-form-angular.md

Angular Signing Form

Example Code

angular
import { Component } from '@angular/core';
import { DocusealFormComponent } from '@docuseal/angular';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [DocusealFormComponent],
  template: `
    
      <docuseal-form
        [src]="'https://docuseal.com/d/{{template_slug}}'"
        [email]="'{{signer_email}}'">
      </docuseal-form>
    
  `
})
export class AppComponent {}

Attributes

text
/* Detailed source-code truncated for AI context efficiency. */

Callback

json
{
  "onInit": {
    "type": "event emitter",
    "required": false,
    "description": "Event emitted on initializing the form component.",
    "example": "handleInit($event)"
  },
  "onLoad": {
    "type": "event emitter",
    "required": false,
    "description": "Event emitted on loading the form data.",
    "example": "handleLoad($event)"
  },
  "onComplete": {
    "type": "event emitter",
    "required": false,
    "description": "Event emitted on form completion.",
    "example": "handleComplete($event)"
  },
  "onDecline": {
    "type": "event emitter",
    "required": false,
    "description": "Event emitted after the form decline.",
    "example": "handleDecline($event)"
  }
}

File: docs/embedding/signing-form-javascript.md

JavaScript Signing Form

Example Code

javascript
<script src="https://cdn.docuseal.com/js/form.js"></script>

<docuseal-form
  id="docusealForm"
  data-src="https://docuseal.com/d/{{ template_slug }}"
  data-email="{{ signer_email }}">
</docuseal-form>

<script>
  window.docusealForm.addEventListener('completed', (e) => {
    console.log(e.detail)
  })
</script>

Attributes

text
/* Detailed source-code truncated for AI context efficiency. */

Callback

json
{
  "init": {
    "type": "event",
    "required": false,
    "description": "Custom event to be triggered on initializing the form component.",
    "example": "document.querySelector('docuseal-form').addEventListener('init', () => console.log('init'))"
  },
  "load": {
    "type": "event",
    "required": false,
    "description": "Custom event to be triggered on loading the form data.",
    "example": "document.querySelector('docuseal-form').addEventListener('load', (e) => e.detail)"
  },
  "completed": {
    "type": "event",
    "required": false,
    "description": "Custom event to be triggered after form completion.",
    "example": "document.querySelector('docuseal-form').addEventListener('completed', (e) => e.detail)"
  },
  "declined": {
    "type": "event",
    "description": "Custom event to be triggered after form decline.",
    "example": "document.querySelector('docuseal-form').addEventListener('declined', (e) => e.detail)"
  }
}

File: docs/embedding/signing-form-react.md

React Signing Form

Example Code

react
import React from "react"
import { DocusealForm } from '@docuseal/react'

export function App() {
  return (
    
      <DocusealForm
        src="https://docuseal.com/d/{{template_slug}}"
        email="{{signer_email}}"
        onComplete={(data) => console.log(data)}
      />
    
  );
}

Attributes

text
/* Detailed source-code truncated for AI context efficiency. */

Callback

json
{
  "onInit": {
    "type": "function",
    "required": false,
    "description": "Function to be called on initializing the form component.",
    "example": "() => { console.log(\"Loaded\") }"
  },
  "onLoad": {
    "type": "function",
    "required": false,
    "description": "Function to be called on loading the form data.",
    "example": "(data) => { console.log(data) }"
  },
  "onComplete": {
    "type": "function",
    "required": false,
    "description": "Function to be called after the form completion.",
    "example": "(data) => { console.log(data) }"
  },
  "onDecline": {
    "type": "function",
    "required": false,
    "description": "Function to be called after the form decline.",
    "example": "(data) => { console.log(data) }"
  }
}

File: docs/embedding/signing-form-vue.md

Vue Signing Form

Example Code

vue
<template>
  <DocusealForm
    :src="'https://docuseal.com/d/{{template_slug}}'"
    :email="'{{signer_email}}'"
    @complete="onFormComplete"
  />
</template>

<script>
import { DocusealForm } from '@docuseal/vue'

export default {
  name: 'App',
  components: {
    DocusealForm
  },
  methods: {
    onFormComplete (data) {
      console.log(data)
    }
  }
}
</script>

Attributes

text
/* Detailed source-code truncated for AI context efficiency. */

Callback

json
{
  "@init": {
    "type": "function",
    "required": false,
    "description": "Function to be called on initializing the form component.",
    "example": "onFormLoad"
  },
  "@load": {
    "type": "function",
    "required": false,
    "description": "Function to be called on loading the form data.",
    "example": "onFormLoad"
  },
  "@complete": {
    "type": "function",
    "required": false,
    "description": "Function to be called after the form completion.",
    "example": "onFormComplete"
  },
  "@decline": {
    "type": "function",
    "required": false,
    "description": "Function to be called after the form decline.",
    "example": "onFormDecline"
  }
}

File: docs/api/csharp.md

List all submissions

The API endpoint provides the ability to retrieve a list of available submissions.

csharp
var client = new RestClient("https://api.docuseal.com/submissions");
var request = new RestRequest("", Method.Get);
request.AddHeader("X-Auth-Token", "API_KEY");
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Get a submission

The API endpoint provides the functionality to retrieve information about a submission.

csharp
var client = new RestClient("https://api.docuseal.com/submissions/1001");
var request = new RestRequest("", Method.Get);
request.AddHeader("X-Auth-Token", "API_KEY");
var response = client.Execute(request);
json
{
  "security": [
    {
      "AuthToken": []
    }
  ],
  "tags": [
    "Submissions"
  ],
  "summary": "Get a submission",
  "operationId": "getSubmission",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer"
      },
      "description": "The unique identifier of the submission.",
      "example": 1001
    }
  ]
}

Get submission documents

This endpoint returns a list of partially filled documents for a submission. If the submission has been completed, the final signed documents are returned.

csharp
var client = new RestClient("https://api.docuseal.com/submissions/1001/documents");
var request = new RestRequest("", Method.Get);
request.AddHeader("X-Auth-Token", "API_KEY");
var response = client.Execute(request);
json
{
  "security": [
    {
      "AuthToken": []
    }
  ],
  "tags": [
    "Submissions"
  ],
  "summary": "Get submission documents",
  "operationId": "getSubmissionDocuments",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer"
      },
      "description": "The unique identifier of the submission.",
      "example": 1001
    },
    {
      "name": "merge",
      "in": "query",
      "required": false,
      "schema": {
        "type": "boolean",
        "default": false
      },
      "description": "When `true`, merges all documents into a single PDF.",
      "example": false
    }
  ]
}

Create a submission

This API endpoint allows you to create signature requests (submissions) for a document template and send them to the specified submitters (signers).Related GuidesSend documents for signature via APIPre-fill PDF document form fields with API

csharp
var client = new RestClient("https://api.docuseal.com/submissions");
var request = new RestRequest("", Method.Post);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"template_id\":1000001,\"send_email\":true,\"submitters\":[{\"role\":\"First Party\",\"email\":\"[email protected]\"}]}", ParameterType.RequestBody);
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Create a submission from PDF

The API endpoint provides the functionality to create one-off submission request from a PDF. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using fields param.Related GuidesUse embedded text field tags to create a fillable form

csharp
var client = new RestClient("https://api.docuseal.com/submissions/pdf");
var request = new RestRequest("", Method.Post);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":\"Test Submission Document\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\",\"fields\":[{\"name\":\"string\",\"areas\":[{\"x\":0,\"y\":0,\"w\":0,\"h\":0,\"page\":1}]}]}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"[email protected]\"}]}", ParameterType.RequestBody);
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Create a submission from DOCX

The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use [[variable_name]] text tags to define dynamic content variables in the document. See https://www.docuseal.com/examples/demo_template.docx for the specific text variable syntax, including dynamic content tables and lists. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.Related GuidesUse dynamic content variables in DOCX to create personalized documents

csharp
var client = new RestClient("https://api.docuseal.com/submissions/docx");
var request = new RestRequest("", Method.Post);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":\"Test Submission Document\",\"variables\":{\"variable_name\":\"value\"},\"documents\":[{\"name\":\"string\",\"file\":\"base64\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"[email protected]\"}]}", ParameterType.RequestBody);
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Create a submission from HTML

This API endpoint allows you to create a one-off submission request document using the provided HTML content, with special field tags rendered as a fillable and signable form.Related GuidesCreate PDF document fillable form with HTML

csharp
var client = new RestClient("https://api.docuseal.com/submissions/html");
var request = new RestRequest("", Method.Post);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":\"Test Submission Document\",\"documents\":[{\"name\":\"Test Document\",\"html\":\"Lorem Ipsum is simply dummy text of the\\n<text-field\\n  name=\\\"Industry\\\"\\n  role=\\\"First Party\\\"\\n  required=\\\"false\\\"\\n  style=\\\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\\\">\\n</text-field>\\nand typesetting industry\\n\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"[email protected]\"}]}", ParameterType.RequestBody);
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Archive a submission

The API endpoint allows you to archive a submission.

csharp
var client = new RestClient("https://api.docuseal.com/submissions/1001");
var request = new RestRequest("", Method.Delete);
request.AddHeader("X-Auth-Token", "API_KEY");
var response = client.Execute(request);
json
{
  "security": [
    {
      "AuthToken": []
    }
  ],
  "tags": [
    "Submissions"
  ],
  "summary": "Archive a submission",
  "operationId": "archiveSubmission",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer"
      },
      "description": "The unique identifier of the submission.",
      "example": 1001
    }
  ]
}

List all submitters

The API endpoint provides the ability to retrieve a list of submitters.

csharp
var client = new RestClient("https://api.docuseal.com/submitters");
var request = new RestRequest("", Method.Get);
request.AddHeader("X-Auth-Token", "API_KEY");
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Get a submitter

The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.

csharp
var client = new RestClient("https://api.docuseal.com/submitters/500001");
var request = new RestRequest("", Method.Get);
request.AddHeader("X-Auth-Token", "API_KEY");
var response = client.Execute(request);
json
{
  "security": [
    {
      "AuthToken": []
    }
  ],
  "tags": [
    "Submitters"
  ],
  "summary": "Get a submitter",
  "operationId": "getSubmitter",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer"
      },
      "description": "The unique identifier of the submitter.",
      "example": 500001
    }
  ]
}

Update a submitter

The API endpoint allows you to update submitter details, pre-fill or update field values and re-send emails.Related GuidesAutomatically sign documents via API

csharp
var client = new RestClient("https://api.docuseal.com/submitters/500001");
var request = new RestRequest("", Method.Put);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"email\":\"[email protected]\",\"fields\":[{\"name\":\"First Name\",\"default_value\":\"Acme\"}]}", ParameterType.RequestBody);
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

List all templates

The API endpoint provides the ability to retrieve a list of available document templates.

csharp
var client = new RestClient("https://api.docuseal.com/templates");
var request = new RestRequest("", Method.Get);
request.AddHeader("X-Auth-Token", "API_KEY");
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Get a template

The API endpoint provides the functionality to retrieve information about a document template.

csharp
var client = new RestClient("https://api.docuseal.com/templates/1000001");
var request = new RestRequest("", Method.Get);
request.AddHeader("X-Auth-Token", "API_KEY");
var response = client.Execute(request);
json
{
  "security": [
    {
      "AuthToken": []
    }
  ],
  "tags": [
    "Templates"
  ],
  "summary": "Get a template",
  "operationId": "getTemplate",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer"
      },
      "description": "The unique identifier of the document template.",
      "example": 1000001
    }
  ]
}

Create a template from PDF

The API endpoint provides the functionality to create a fillable document template for a PDF file. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using fields param.Related GuidesUse embedded text field tags to create a fillable form

csharp
var client = new RestClient("https://api.docuseal.com/templates/pdf");
var request = new RestRequest("", Method.Post);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":\"Test PDF\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\",\"fields\":[{\"name\":\"string\",\"areas\":[{\"x\":0,\"y\":0,\"w\":0,\"h\":0,\"page\":1}]}]}]}", ParameterType.RequestBody);
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Create a template from Word DOCX

The API endpoint provides the functionality to create a fillable document template for an existing Microsoft Word document. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://www.docuseal.com/examples/fieldtags.docx for more text tag formats. Or specify the exact pixel coordinates of the document fields using fields param.Related GuidesUse embedded text field tags to create a fillable form

csharp
var client = new RestClient("https://api.docuseal.com/templates/docx");
var request = new RestRequest("", Method.Post);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":\"Test DOCX\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\"}]}", ParameterType.RequestBody);
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Create a template from HTML

The API endpoint provides the functionality to seamlessly generate a PDF document template by utilizing the provided HTML content while incorporating pre-defined fields.Related GuidesCreate PDF document fillable form with HTML

csharp
var client = new RestClient("https://api.docuseal.com/templates/html");
var request = new RestRequest("", Method.Post);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"html\":\"Lorem Ipsum is simply dummy text of the\\n<text-field\\n  name=\\\"Industry\\\"\\n  role=\\\"First Party\\\"\\n  required=\\\"false\\\"\\n  style=\\\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\\\">\\n</text-field>\\nand typesetting industry\\n\",\"name\":\"Test Template\"}", ParameterType.RequestBody);
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Clone a template

The API endpoint allows you to clone an existing template into a new template.

csharp
var client = new RestClient("https://api.docuseal.com/templates/1000001/clone");
var request = new RestRequest("", Method.Post);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":\"Cloned Template\"}", ParameterType.RequestBody);
var response = client.Execute(request);
json
{
  "security": [
    {
      "AuthToken": []
    }
  ],
  "tags": [
    "Templates"
  ],
  "summary": "Clone a template",
  "operationId": "cloneTemplate",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer"
      },
      "description": "The unique identifier of the document template.",
      "example": 1000001
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "Template name. Existing name with (Clone) suffix will be used if not specified.",
              "examples": [
                "Cloned Template"
              ]
            },
            "folder_name": {
              "type": "string",
              "description": "The folder's name to which the template should be cloned."
            },
            "external_id": {
              "type": "string",
              "description": "Your application-specific unique string key to identify this template within your app."
            }
          }
        }
      }
    }
  }
}

Merge templates

The API endpoint allows you to merge multiple templates with documents and fields into a new combined template.

csharp
var client = new RestClient("https://api.docuseal.com/templates/merge");
var request = new RestRequest("", Method.Post);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"template_ids\":[321,432],\"name\":\"Merged Template\"}", ParameterType.RequestBody);
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Update a template

The API endpoint provides the functionality to move a document template to a different folder and update the name of the template.

csharp
var client = new RestClient("https://api.docuseal.com/templates/1000001");
var request = new RestRequest("", Method.Put);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"name\":\"New Document Name\",\"folder_name\":\"New Folder\"}", ParameterType.RequestBody);
var response = client.Execute(request);
json
{
  "security": [
    {
      "AuthToken": []
    }
  ],
  "tags": [
    "Templates"
  ],
  "summary": "Update a template",
  "operationId": "updateTemplate",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer"
      },
      "description": "The unique identifier of the document template.",
      "example": 1000001
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the template.",
              "examples": [
                "New Document Name"
              ]
            },
            "folder_name": {
              "type": "string",
              "description": "The folder's name to which the template should be moved.",
              "examples": [
                "New Folder"
              ]
            },
            "roles": {
              "type": "array",
              "description": "An array of submitter role names to update the template with.",
              "items": {
                "type": "string"
              },
              "examples": [
                [
                  "Agent",
                  "Customer"
                ]
              ]
            },
            "archived": {
              "type": "boolean",
              "description": "Set `false` to unarchive template."
            }
          }
        }
      }
    }
  }
}

Update template documents

The API endpoint allows you to add, remove or replace documents in the template with provided PDF/DOCX file or HTML content.

csharp
var client = new RestClient("https://api.docuseal.com/templates/1000001/documents");
var request = new RestRequest("", Method.Put);
request.AddHeader("X-Auth-Token", "API_KEY");
request.AddHeader("content-type", "application/json");
request.AddParameter("application/json", "{\"documents\":[{\"file\":\"string\"}]}", ParameterType.RequestBody);
var response = client.Execute(request);
text
/* Detailed source-code truncated for AI context efficiency. */

Archive a template

The API endpoint allows you to archive a document template.

csharp
var client = new RestClient("https://api.docuseal.com/templates/1000001");
var request = new RestRequest("", Method.Delete);
request.AddHeader("X-Auth-Token", "API_KEY");
var response = client.Execute(request);
json
{
  "security": [
    {
      "AuthToken": []
    }
  ],
  "tags": [
    "Templates"
  ],
  "summary": "Archive a template",
  "operationId": "archiveTemplate",
  "parameters": [
    {
      "name": "id",
      "in": "path",
      "required": true,
      "schema": {
        "type": "integer"
      },
      "description": "The unique identifier of the document template.",
      "example": 1000001
    }
  ]
}