diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 28542a17..8681e074 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -21,7 +21,7 @@ jobs:
- name: Docker meta
id: meta
- uses: docker/metadata-action@v4
+ uses: docker/metadata-action@v5
with:
images: ghcr.io/wabolabs/wabosign
tags: |
@@ -51,3 +51,7 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
+ labels: ${{ steps.meta.outputs.labels }}
+ build-args: |
+ VERSION=${{ github.ref_name }}
+ REVISION=${{ github.sha }}
diff --git a/CHANGELOG.md b/CHANGELOG.md
new file mode 100644
index 00000000..b3f8d7cf
--- /dev/null
+++ b/CHANGELOG.md
@@ -0,0 +1,34 @@
+# Changelog
+
+All notable changes to WaboSign are documented here. The format is based on
+[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and this project
+adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+
+## [1.0.0] — 2026-05-17
+
+First WaboSign release. Forked from [DocuSeal](https://github.com/docusealco/docuseal) 2.5.3.
+
+### Added
+- Google Workspace SSO via `omniauth-google-oauth2`, configurable from `/settings/sso` with ENV + DB fallback. See [GOOGLE_SSO.md](GOOGLE_SSO.md).
+- SMS invitations via BulkVS, configurable from `/settings/sms`. See [SMS.md](SMS.md).
+- Custom account logo upload with server-side SVG sanitization. The logo renders on the sign-in page, signing flow, dashboard navbar, share-link QR page, and audit-trail PDFs.
+- Editor and Viewer user roles alongside Admin. Editors get CRUD on templates and submissions; Viewers get read-only access. Self-service profile management is preserved for every role.
+- OCI image labels (`org.opencontainers.image.*`) and multi-arch (linux/amd64 + linux/arm64) Docker builds wired via `.github/workflows/docker.yml`.
+- [CHANGELOG.md](CHANGELOG.md) and a Releases section in [README.md](README.md).
+
+### Changed
+- Removed the upstream "Pro" feature paywall — multi-account, SSO, SMS, audit trail, and timestamping all work out of the box on a self-hosted deployment.
+- Rebranded all UI surfaces, emails, and asset paths from DocuSeal to WaboSign while preserving AGPL §7(b) upstream attribution in [NOTICE](NOTICE), [REBRANDING.md](REBRANDING.md), [LICENSE_ADDITIONAL_TERMS](LICENSE_ADDITIONAL_TERMS), and the in-app "Powered by" footer.
+- Default container image is now `ghcr.io/wabolabs/wabosign` (public).
+- Security contact in [SECURITY.md](SECURITY.md) now routes to `wabosign@wabo.cc`.
+
+### Removed
+- Developer Newsletter step from the initial-setup flow (was a DocuSeal mailing-list signup).
+- Console-redirect endpoints (`/upgrade`, `/manage`, `/console_redirect`) and the enquiries form — only made sense for DocuSeal's hosted multitenant SaaS.
+- Upstream API-docs language stubs at `docs/api/` (10 files referencing `api.docuseal.com`). The OpenAPI spec at `docs/openapi.json` and the embedding/webhook guides remain (URLs rewritten to `sign.wabo.cc`).
+- The "Upgrade to Pro" fallback markup served by the embed-script controller — replaced with a neutral "embed assets not loaded" message.
+
+### Security
+- Account-logo SVG uploads are sanitized via Nokogiri before storage (strips `
+ <%= link_to t(:learn_more), "#{Wabosign::PRODUCT_URL}/docs/embedding", target: "_blank", data: { turbo: false }, class: "btn btn-ghost text-gray-100 flex", rel: "noopener" %>
+
<script src="<%= Wabosign::CDN_URL %>/js/form.js"></script>
+ <script src="<%= embed_script_url(filename: "form.js") %>"></script>
<docuseal-form data-src="<%= start_form_url(slug: template.slug) %>"></docuseal-form>
@@ -88,7 +88,7 @@
- <%= link_to t('learn_more'), console_redirect_index_path(redir: "#{Wabosign::CONSOLE_URL}/embedding/form"), target: '_blank', data: { turbo: false }, class: 'btn btn-ghost text-gray-100 flex', rel: 'noopener' %>
+ <%= link_to t(:learn_more), "#{Wabosign::PRODUCT_URL}/docs/embedding", target: "_blank", data: { turbo: false }, class: "btn btn-ghost text-gray-100 flex", rel: "noopener" %>
- <%= link_to t('learn_more'), console_redirect_index_path(redir: "#{Wabosign::CONSOLE_URL}/embedding/form"), target: '_blank', data: { turbo: false }, class: 'btn btn-ghost text-gray-100 flex', rel: 'noopener' %>
+ <%= link_to t(:learn_more), "#{Wabosign::PRODUCT_URL}/docs/embedding", target: "_blank", data: { turbo: false }, class: "btn btn-ghost text-gray-100 flex", rel: "noopener" %>
- <%= link_to t('learn_more'), console_redirect_index_path(redir: "#{Wabosign::CONSOLE_URL}/embedding/form"), target: '_blank', data: { turbo: false }, class: 'btn btn-ghost text-gray-100 flex', rel: 'noopener' %>
+ <%= link_to t(:learn_more), "#{Wabosign::PRODUCT_URL}/docs/embedding", target: "_blank", data: { turbo: false }, class: "btn btn-ghost text-gray-100 flex", rel: "noopener" %>
Related Guides
Send documents for signature via API
Pre-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\":\"john.doe@example.com\"}]}", ParameterType.RequestBody);
-var response = client.Execute(request);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission",
- "operationId": "createSubmission",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_id",
- "submitters"
- ],
- "properties": {
- "template_id": {
- "type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
- "example": 1000001
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject for the submitter."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Use 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\":\"john.doe@example.com\"}]}", ParameterType.RequestBody);
-var response = client.Execute(request);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from PDF",
- "operationId": "createSubmissionFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- }
- }
- }
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use 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\":\"john.doe@example.com\"}]}", ParameterType.RequestBody);
-var response = client.Execute(request);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from DOCX",
- "operationId": "createSubmissionFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "variables": {
- "type": "object",
- "description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
- "example": {
- "variable_name": "value"
- }
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create 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\\n \\nand typesetting industry
\\n\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}", ParameterType.RequestBody);
-var response = client.Execute(request);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from HTML",
- "operationId": "createSubmissionFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- },
- "html": {
- "type": "string",
- "description": "HTML document content with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML document content of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML document content of the footer to be displayed on every page."
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "List all submitters",
- "operationId": "getSubmitters",
- "parameters": [
- {
- "name": "submission_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The submission ID allows you to receive only the submitters related to that specific submission."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters on name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters by unique slug.",
- "example": "zAyL9fH36Havvm"
- },
- {
- "name": "completed_after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-05 9:32:20",
- "description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
- },
- {
- "name": "completed_before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-06 19:32:20",
- "description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submitters to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."
- }
- ]
-}
-```
-
-### 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 Guides
Automatically 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\":\"john.doe@example.com\",\"fields\":[{\"name\":\"First Name\",\"default_value\":\"Acme\"}]}", ParameterType.RequestBody);
-var response = client.Execute(request);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "Update a submitter",
- "operationId": "updateSubmitter",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter.",
- "example": 500001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request emails."
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request via phone number SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "List all templates",
- "operationId": "getTemplates",
- "parameters": [
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates based on the name partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by unique slug.",
- "example": "opaKWh8WWTAcVG"
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."
- },
- {
- "name": "folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Get only archived templates instead of active ones."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of templates to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."
- }
- ]
-}
-```
-
-### 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 Guides
Use 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);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from PDF",
- "operationId": "createTemplateFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test PDF"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
- "example": "unique-key"
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Create a template from Word DOCX
-
-The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use 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);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from Word DOCX",
- "operationId": "createTemplateFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test DOCX"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
- "example": "unique-key"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "type": "string",
- "example": "base64",
- "format": "base64",
- "description": "Base64-encoded content of the DOCX file or downloadable file URL"
- },
- "fields": {
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1."
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create 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\\n \\nand typesetting industry
\\n\",\"name\":\"Test Template\"}", ParameterType.RequestBody);
-var response = client.Execute(request);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from HTML",
- "operationId": "createTemplateFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML template of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML template of the footer to be displayed on every page."
- },
- "name": {
- "type": "string",
- "description": "Template name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
- "example": "714d974e-83d8-11ee-b962-0242ac120002"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Clone a template
-
-The API endpoint allows you to clone 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 documents 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.",
- "example": "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);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Merge templates",
- "operationId": "mergeTemplate",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_ids"
- ],
- "properties": {
- "template_ids": {
- "type": "array",
- "description": "An array of template ids to merge into a new template.",
- "items": {
- "type": "integer"
- },
- "example": [
- 321,
- 432
- ]
- },
- "name": {
- "type": "string",
- "description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
- "example": "Merged Template"
- },
- "folder_name": {
- "type": "string",
- "description": "The name of the folder in which the merged template should be placed."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to be used in the merged template.",
- "items": {
- "type": "string"
- },
- "example": [
- "Agent",
- "Customer"
- ]
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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",
- "example": "New Document Name"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be moved.",
- "example": "New Folder"
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to update the template with.",
- "items": {
- "type": "string"
- },
- "example": [
- "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);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Update template documents",
- "operationId": "addDocumentToTemplate",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the documents template.",
- "example": 1000001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "documents": {
- "type": "array",
- "description": "The list of documents to add or replace in the template.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "file": {
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
- },
- "html": {
- "type": "string",
- "description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
- },
- "position": {
- "type": "integer",
- "description": "Position of the document. By default will be added as the last document in the template.",
- "example": 0
- },
- "replace": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
- },
- "remove": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to remove existing document at given `position` or with given `name`."
- }
- }
- }
- },
- "merge": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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
- }
- ]
-}
-```
-
diff --git a/docs/api/go.md b/docs/api/go.md
deleted file mode 100644
index a141ac3a..00000000
--- a/docs/api/go.md
+++ /dev/null
@@ -1,4360 +0,0 @@
-### List all submissions
-
-The API endpoint provides the ability to retrieve a list of available submissions.
-
-```go
-package main
-
-import (
- "fmt"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submissions"
-
- req, _ := http.NewRequest("GET", url, nil)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "List all submissions",
- "operationId": "getSubmissions",
- "parameters": [
- {
- "name": "template_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The template ID allows you to receive only the submissions created from that specific template."
- },
- {
- "name": "status",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "pending",
- "completed",
- "declined",
- "expired"
- ]
- },
- "description": "Filter submissions by status."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions based on submitters name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by unique slug.",
- "example": "NtLDQM7eJX2ZMd"
- },
- {
- "name": "template_folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by template folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Returns only archived submissions when `true` and only active submissions when `false`."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submissions to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."
- }
- ]
-}
-```
-
-### Get a submission
-
-The API endpoint provides the functionality to retrieve information about a submission.
-
-```go
-package main
-
-import (
- "fmt"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submissions/1001"
-
- req, _ := http.NewRequest("GET", url, nil)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```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.
-
-```go
-package main
-
-import (
- "fmt"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submissions/1001/documents"
-
- req, _ := http.NewRequest("GET", url, nil)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```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
- }
- ]
-}
-```
-
-### 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 Guides
Send documents for signature via API
Pre-fill PDF document form fields with API
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submissions"
-
- payload := strings.NewReader("{\"template_id\":1000001,\"send_email\":true,\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
-
- req, _ := http.NewRequest("POST", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission",
- "operationId": "createSubmission",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_id",
- "submitters"
- ],
- "properties": {
- "template_id": {
- "type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
- "example": 1000001
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject for the submitter."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submissions/pdf"
-
- payload := strings.NewReader("{\"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\":\"john.doe@example.com\"}]}")
-
- req, _ := http.NewRequest("POST", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from PDF",
- "operationId": "createSubmissionFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- }
- }
- }
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submissions/docx"
-
- payload := strings.NewReader("{\"name\":\"Test Submission Document\",\"variables\":{\"variable_name\":\"value\"},\"documents\":[{\"name\":\"string\",\"file\":\"base64\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
-
- req, _ := http.NewRequest("POST", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from DOCX",
- "operationId": "createSubmissionFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "variables": {
- "type": "object",
- "description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
- "example": {
- "variable_name": "value"
- }
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submissions/html"
-
- payload := strings.NewReader("{\"name\":\"Test Submission Document\",\"documents\":[{\"name\":\"Test Document\",\"html\":\"Lorem Ipsum is simply dummy text of the\\n\\n \\nand typesetting industry
\\n\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
-
- req, _ := http.NewRequest("POST", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from HTML",
- "operationId": "createSubmissionFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- },
- "html": {
- "type": "string",
- "description": "HTML document content with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML document content of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML document content of the footer to be displayed on every page."
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a submission
-
-The API endpoint allows you to archive a submission.
-
-```go
-package main
-
-import (
- "fmt"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submissions/1001"
-
- req, _ := http.NewRequest("DELETE", url, nil)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```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.
-
-```go
-package main
-
-import (
- "fmt"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submitters"
-
- req, _ := http.NewRequest("GET", url, nil)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "List all submitters",
- "operationId": "getSubmitters",
- "parameters": [
- {
- "name": "submission_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The submission ID allows you to receive only the submitters related to that specific submission."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters on name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters by unique slug.",
- "example": "zAyL9fH36Havvm"
- },
- {
- "name": "completed_after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-05 9:32:20",
- "description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
- },
- {
- "name": "completed_before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-06 19:32:20",
- "description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submitters to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a submitter
-
-The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.
-
-```go
-package main
-
-import (
- "fmt"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submitters/500001"
-
- req, _ := http.NewRequest("GET", url, nil)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```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 Guides
Automatically sign documents via API
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/submitters/500001"
-
- payload := strings.NewReader("{\"email\":\"john.doe@example.com\",\"fields\":[{\"name\":\"First Name\",\"default_value\":\"Acme\"}]}")
-
- req, _ := http.NewRequest("PUT", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "Update a submitter",
- "operationId": "updateSubmitter",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter.",
- "example": 500001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request emails."
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request via phone number SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### List all templates
-
-The API endpoint provides the ability to retrieve a list of available document templates.
-
-```go
-package main
-
-import (
- "fmt"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/templates"
-
- req, _ := http.NewRequest("GET", url, nil)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "List all templates",
- "operationId": "getTemplates",
- "parameters": [
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates based on the name partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by unique slug.",
- "example": "opaKWh8WWTAcVG"
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."
- },
- {
- "name": "folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Get only archived templates instead of active ones."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of templates to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a template
-
-The API endpoint provides the functionality to retrieve information about a document template.
-
-```go
-package main
-
-import (
- "fmt"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/templates/1000001"
-
- req, _ := http.NewRequest("GET", url, nil)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```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 Guides
Use embedded text field tags to create a fillable form
-
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/templates/pdf"
-
- payload := strings.NewReader("{\"name\":\"Test PDF\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\",\"fields\":[{\"name\":\"string\",\"areas\":[{\"x\":0,\"y\":0,\"w\":0,\"h\":0,\"page\":1}]}]}]}")
-
- req, _ := http.NewRequest("POST", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from PDF",
- "operationId": "createTemplateFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test PDF"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
- "example": "unique-key"
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Create a template from Word DOCX
-
-The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/templates/docx"
-
- payload := strings.NewReader("{\"name\":\"Test DOCX\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\"}]}")
-
- req, _ := http.NewRequest("POST", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from Word DOCX",
- "operationId": "createTemplateFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test DOCX"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
- "example": "unique-key"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "type": "string",
- "example": "base64",
- "format": "base64",
- "description": "Base64-encoded content of the DOCX file or downloadable file URL"
- },
- "fields": {
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1."
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/templates/html"
-
- payload := strings.NewReader("{\"html\":\"Lorem Ipsum is simply dummy text of the\\n\\n \\nand typesetting industry
\\n\",\"name\":\"Test Template\"}")
-
- req, _ := http.NewRequest("POST", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from HTML",
- "operationId": "createTemplateFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML template of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML template of the footer to be displayed on every page."
- },
- "name": {
- "type": "string",
- "description": "Template name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
- "example": "714d974e-83d8-11ee-b962-0242ac120002"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Clone a template
-
-The API endpoint allows you to clone existing template into a new template.
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/templates/1000001/clone"
-
- payload := strings.NewReader("{\"name\":\"Cloned Template\"}")
-
- req, _ := http.NewRequest("POST", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```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 documents 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.",
- "example": "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.
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/templates/merge"
-
- payload := strings.NewReader("{\"template_ids\":[321,432],\"name\":\"Merged Template\"}")
-
- req, _ := http.NewRequest("POST", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Merge templates",
- "operationId": "mergeTemplate",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_ids"
- ],
- "properties": {
- "template_ids": {
- "type": "array",
- "description": "An array of template ids to merge into a new template.",
- "items": {
- "type": "integer"
- },
- "example": [
- 321,
- 432
- ]
- },
- "name": {
- "type": "string",
- "description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
- "example": "Merged Template"
- },
- "folder_name": {
- "type": "string",
- "description": "The name of the folder in which the merged template should be placed."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to be used in the merged template.",
- "items": {
- "type": "string"
- },
- "example": [
- "Agent",
- "Customer"
- ]
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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.
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/templates/1000001"
-
- payload := strings.NewReader("{\"name\":\"New Document Name\",\"folder_name\":\"New Folder\"}")
-
- req, _ := http.NewRequest("PUT", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```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",
- "example": "New Document Name"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be moved.",
- "example": "New Folder"
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to update the template with.",
- "items": {
- "type": "string"
- },
- "example": [
- "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.
-
-```go
-package main
-
-import (
- "fmt"
- "strings"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/templates/1000001/documents"
-
- payload := strings.NewReader("{\"documents\":[{\"file\":\"string\"}]}")
-
- req, _ := http.NewRequest("PUT", url, payload)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
- req.Header.Add("content-type", "application/json")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Update template documents",
- "operationId": "addDocumentToTemplate",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the documents template.",
- "example": 1000001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "documents": {
- "type": "array",
- "description": "The list of documents to add or replace in the template.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "file": {
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
- },
- "html": {
- "type": "string",
- "description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
- },
- "position": {
- "type": "integer",
- "description": "Position of the document. By default will be added as the last document in the template.",
- "example": 0
- },
- "replace": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
- },
- "remove": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to remove existing document at given `position` or with given `name`."
- }
- }
- }
- },
- "merge": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a template
-
-The API endpoint allows you to archive a document template.
-
-```go
-package main
-
-import (
- "fmt"
- "net/http"
- "io"
-)
-
-func main() {
-
- url := "https://api.docuseal.com/templates/1000001"
-
- req, _ := http.NewRequest("DELETE", url, nil)
-
- req.Header.Add("X-Auth-Token", "API_KEY")
-
- res, _ := http.DefaultClient.Do(req)
-
- defer res.Body.Close()
- body, _ := io.ReadAll(res.Body)
-
- fmt.Println(res)
- fmt.Println(string(body))
-
-}
-```
-
-```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
- }
- ]
-}
-```
-
diff --git a/docs/api/java.md b/docs/api/java.md
deleted file mode 100644
index 59b55aad..00000000
--- a/docs/api/java.md
+++ /dev/null
@@ -1,3874 +0,0 @@
-### List all submissions
-
-The API endpoint provides the ability to retrieve a list of available submissions.
-
-```java
-HttpResponse response = Unirest.get("https://api.docuseal.com/submissions")
- .header("X-Auth-Token", "API_KEY")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "List all submissions",
- "operationId": "getSubmissions",
- "parameters": [
- {
- "name": "template_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The template ID allows you to receive only the submissions created from that specific template."
- },
- {
- "name": "status",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "pending",
- "completed",
- "declined",
- "expired"
- ]
- },
- "description": "Filter submissions by status."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions based on submitters name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by unique slug.",
- "example": "NtLDQM7eJX2ZMd"
- },
- {
- "name": "template_folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by template folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Returns only archived submissions when `true` and only active submissions when `false`."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submissions to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."
- }
- ]
-}
-```
-
-### Get a submission
-
-The API endpoint provides the functionality to retrieve information about a submission.
-
-```java
-HttpResponse response = Unirest.get("https://api.docuseal.com/submissions/1001")
- .header("X-Auth-Token", "API_KEY")
- .asString();
-```
-
-```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.
-
-```java
-HttpResponse response = Unirest.get("https://api.docuseal.com/submissions/1001/documents")
- .header("X-Auth-Token", "API_KEY")
- .asString();
-```
-
-```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
- }
- ]
-}
-```
-
-### 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 Guides
Send documents for signature via API
Pre-fill PDF document form fields with API
-
-```java
-HttpResponse response = Unirest.post("https://api.docuseal.com/submissions")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"template_id\":1000001,\"send_email\":true,\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission",
- "operationId": "createSubmission",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_id",
- "submitters"
- ],
- "properties": {
- "template_id": {
- "type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
- "example": 1000001
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject for the submitter."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```java
-HttpResponse response = Unirest.post("https://api.docuseal.com/submissions/pdf")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"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\":\"john.doe@example.com\"}]}")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from PDF",
- "operationId": "createSubmissionFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- }
- }
- }
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents
-
-```java
-HttpResponse response = Unirest.post("https://api.docuseal.com/submissions/docx")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"name\":\"Test Submission Document\",\"variables\":{\"variable_name\":\"value\"},\"documents\":[{\"name\":\"string\",\"file\":\"base64\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from DOCX",
- "operationId": "createSubmissionFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "variables": {
- "type": "object",
- "description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
- "example": {
- "variable_name": "value"
- }
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```java
-HttpResponse response = Unirest.post("https://api.docuseal.com/submissions/html")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"name\":\"Test Submission Document\",\"documents\":[{\"name\":\"Test Document\",\"html\":\"Lorem Ipsum is simply dummy text of the\\n\\n \\nand typesetting industry
\\n\"}],\"submitters\":[{\"role\":\"First Party\",\"email\":\"john.doe@example.com\"}]}")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from HTML",
- "operationId": "createSubmissionFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- },
- "html": {
- "type": "string",
- "description": "HTML document content with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML document content of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML document content of the footer to be displayed on every page."
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a submission
-
-The API endpoint allows you to archive a submission.
-
-```java
-HttpResponse response = Unirest.delete("https://api.docuseal.com/submissions/1001")
- .header("X-Auth-Token", "API_KEY")
- .asString();
-```
-
-```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.
-
-```java
-HttpResponse response = Unirest.get("https://api.docuseal.com/submitters")
- .header("X-Auth-Token", "API_KEY")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "List all submitters",
- "operationId": "getSubmitters",
- "parameters": [
- {
- "name": "submission_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The submission ID allows you to receive only the submitters related to that specific submission."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters on name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters by unique slug.",
- "example": "zAyL9fH36Havvm"
- },
- {
- "name": "completed_after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-05 9:32:20",
- "description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
- },
- {
- "name": "completed_before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-06 19:32:20",
- "description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submitters to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a submitter
-
-The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.
-
-```java
-HttpResponse response = Unirest.get("https://api.docuseal.com/submitters/500001")
- .header("X-Auth-Token", "API_KEY")
- .asString();
-```
-
-```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 Guides
Automatically sign documents via API
-
-```java
-HttpResponse response = Unirest.put("https://api.docuseal.com/submitters/500001")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"email\":\"john.doe@example.com\",\"fields\":[{\"name\":\"First Name\",\"default_value\":\"Acme\"}]}")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "Update a submitter",
- "operationId": "updateSubmitter",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter.",
- "example": 500001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request emails."
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request via phone number SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### List all templates
-
-The API endpoint provides the ability to retrieve a list of available document templates.
-
-```java
-HttpResponse response = Unirest.get("https://api.docuseal.com/templates")
- .header("X-Auth-Token", "API_KEY")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "List all templates",
- "operationId": "getTemplates",
- "parameters": [
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates based on the name partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by unique slug.",
- "example": "opaKWh8WWTAcVG"
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."
- },
- {
- "name": "folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Get only archived templates instead of active ones."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of templates to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a template
-
-The API endpoint provides the functionality to retrieve information about a document template.
-
-```java
-HttpResponse response = Unirest.get("https://api.docuseal.com/templates/1000001")
- .header("X-Auth-Token", "API_KEY")
- .asString();
-```
-
-```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 Guides
Use embedded text field tags to create a fillable form
-
-
-```java
-HttpResponse response = Unirest.post("https://api.docuseal.com/templates/pdf")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"name\":\"Test PDF\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\",\"fields\":[{\"name\":\"string\",\"areas\":[{\"x\":0,\"y\":0,\"w\":0,\"h\":0,\"page\":1}]}]}]}")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from PDF",
- "operationId": "createTemplateFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test PDF"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
- "example": "unique-key"
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Create a template from Word DOCX
-
-The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```java
-HttpResponse response = Unirest.post("https://api.docuseal.com/templates/docx")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"name\":\"Test DOCX\",\"documents\":[{\"name\":\"string\",\"file\":\"base64\"}]}")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from Word DOCX",
- "operationId": "createTemplateFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test DOCX"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
- "example": "unique-key"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "type": "string",
- "example": "base64",
- "format": "base64",
- "description": "Base64-encoded content of the DOCX file or downloadable file URL"
- },
- "fields": {
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1."
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```java
-HttpResponse response = Unirest.post("https://api.docuseal.com/templates/html")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"html\":\"Lorem Ipsum is simply dummy text of the\\n\\n \\nand typesetting industry
\\n\",\"name\":\"Test Template\"}")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from HTML",
- "operationId": "createTemplateFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML template of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML template of the footer to be displayed on every page."
- },
- "name": {
- "type": "string",
- "description": "Template name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
- "example": "714d974e-83d8-11ee-b962-0242ac120002"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Clone a template
-
-The API endpoint allows you to clone existing template into a new template.
-
-```java
-HttpResponse response = Unirest.post("https://api.docuseal.com/templates/1000001/clone")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"name\":\"Cloned Template\"}")
- .asString();
-```
-
-```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 documents 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.",
- "example": "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.
-
-```java
-HttpResponse response = Unirest.post("https://api.docuseal.com/templates/merge")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"template_ids\":[321,432],\"name\":\"Merged Template\"}")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Merge templates",
- "operationId": "mergeTemplate",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_ids"
- ],
- "properties": {
- "template_ids": {
- "type": "array",
- "description": "An array of template ids to merge into a new template.",
- "items": {
- "type": "integer"
- },
- "example": [
- 321,
- 432
- ]
- },
- "name": {
- "type": "string",
- "description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
- "example": "Merged Template"
- },
- "folder_name": {
- "type": "string",
- "description": "The name of the folder in which the merged template should be placed."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to be used in the merged template.",
- "items": {
- "type": "string"
- },
- "example": [
- "Agent",
- "Customer"
- ]
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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.
-
-```java
-HttpResponse response = Unirest.put("https://api.docuseal.com/templates/1000001")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"name\":\"New Document Name\",\"folder_name\":\"New Folder\"}")
- .asString();
-```
-
-```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",
- "example": "New Document Name"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be moved.",
- "example": "New Folder"
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to update the template with.",
- "items": {
- "type": "string"
- },
- "example": [
- "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.
-
-```java
-HttpResponse response = Unirest.put("https://api.docuseal.com/templates/1000001/documents")
- .header("X-Auth-Token", "API_KEY")
- .header("content-type", "application/json")
- .body("{\"documents\":[{\"file\":\"string\"}]}")
- .asString();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Update template documents",
- "operationId": "addDocumentToTemplate",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the documents template.",
- "example": 1000001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "documents": {
- "type": "array",
- "description": "The list of documents to add or replace in the template.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "file": {
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
- },
- "html": {
- "type": "string",
- "description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
- },
- "position": {
- "type": "integer",
- "description": "Position of the document. By default will be added as the last document in the template.",
- "example": 0
- },
- "replace": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
- },
- "remove": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to remove existing document at given `position` or with given `name`."
- }
- }
- }
- },
- "merge": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a template
-
-The API endpoint allows you to archive a document template.
-
-```java
-HttpResponse response = Unirest.delete("https://api.docuseal.com/templates/1000001")
- .header("X-Auth-Token", "API_KEY")
- .asString();
-```
-
-```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
- }
- ]
-}
-```
-
diff --git a/docs/api/javascript.md b/docs/api/javascript.md
deleted file mode 100644
index 297f4c4c..00000000
--- a/docs/api/javascript.md
+++ /dev/null
@@ -1,4034 +0,0 @@
-### List all submissions
-
-The API endpoint provides the ability to retrieve a list of available submissions.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const { data, pagination } = await docuseal.listSubmissions({ limit: 10 });
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "List all submissions",
- "operationId": "getSubmissions",
- "parameters": [
- {
- "name": "template_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The template ID allows you to receive only the submissions created from that specific template."
- },
- {
- "name": "status",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "pending",
- "completed",
- "declined",
- "expired"
- ]
- },
- "description": "Filter submissions by status."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions based on submitters name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by unique slug.",
- "example": "NtLDQM7eJX2ZMd"
- },
- {
- "name": "template_folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by template folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Returns only archived submissions when `true` and only active submissions when `false`."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submissions to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."
- }
- ]
-}
-```
-
-### Get a submission
-
-The API endpoint provides the functionality to retrieve information about a submission.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.getSubmission(1001);
-```
-
-```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.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.getSubmissionDocuments(1001);
-```
-
-```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
- }
- ]
-}
-```
-
-### 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 Guides
Send documents for signature via API
Pre-fill PDF document form fields with API
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.createSubmission({
- template_id: 1000001,
- send_email: true,
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission",
- "operationId": "createSubmission",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_id",
- "submitters"
- ],
- "properties": {
- "template_id": {
- "type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
- "example": 1000001
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject for the submitter."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.createSubmissionFromPdf({
- 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: "john.doe@example.com"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from PDF",
- "operationId": "createSubmissionFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- }
- }
- }
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.createSubmissionFromDocx({
- name: "Test Submission Document",
- variables: {
- variable_name: "value"
- },
- documents: [
- {
- name: "string",
- file: "base64"
- }
- ],
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from DOCX",
- "operationId": "createSubmissionFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "variables": {
- "type": "object",
- "description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
- "example": {
- "variable_name": "value"
- }
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.createSubmissionFromHtml({
- name: "Test Submission Document",
- documents: [
- {
- name: "Test Document",
- html: `Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-`
- }
- ],
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from HTML",
- "operationId": "createSubmissionFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- },
- "html": {
- "type": "string",
- "description": "HTML document content with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML document content of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML document content of the footer to be displayed on every page."
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a submission
-
-The API endpoint allows you to archive a submission.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-await docuseal.archiveSubmission(1001);
-```
-
-```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.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const { data, pagination } = await docuseal.listSubmitters({ limit: 10 });
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "List all submitters",
- "operationId": "getSubmitters",
- "parameters": [
- {
- "name": "submission_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The submission ID allows you to receive only the submitters related to that specific submission."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters on name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters by unique slug.",
- "example": "zAyL9fH36Havvm"
- },
- {
- "name": "completed_after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-05 9:32:20",
- "description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
- },
- {
- "name": "completed_before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-06 19:32:20",
- "description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submitters to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a submitter
-
-The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submitter = await docuseal.getSubmitter(500001);
-```
-
-```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 Guides
Automatically sign documents via API
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submitter = await docuseal.updateSubmitter(500001, {
- email: "john.doe@example.com",
- fields: [
- {
- name: "First Name",
- default_value: "Acme"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "Update a submitter",
- "operationId": "updateSubmitter",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter.",
- "example": 500001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request emails."
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request via phone number SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### List all templates
-
-The API endpoint provides the ability to retrieve a list of available document templates.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const { data, pagination } = await docuseal.listTemplates({ limit: 10 });
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "List all templates",
- "operationId": "getTemplates",
- "parameters": [
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates based on the name partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by unique slug.",
- "example": "opaKWh8WWTAcVG"
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."
- },
- {
- "name": "folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Get only archived templates instead of active ones."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of templates to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a template
-
-The API endpoint provides the functionality to retrieve information about a document template.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.getTemplate(1000001);
-```
-
-```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 Guides
Use embedded text field tags to create a fillable form
-
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.createTemplateFromPdf({
- name: "Test PDF",
- documents: [
- {
- name: "string",
- file: "base64",
- fields: [
- {
- name: "string",
- areas: [
- {
- x: 0,
- y: 0,
- w: 0,
- h: 0,
- page: 1
- }
- ]
- }
- ]
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from PDF",
- "operationId": "createTemplateFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test PDF"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
- "example": "unique-key"
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Create a template from Word DOCX
-
-The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.createTemplateFromDocx({
- name: "Test DOCX",
- documents: [
- {
- name: "string",
- file: "base64"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from Word DOCX",
- "operationId": "createTemplateFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test DOCX"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
- "example": "unique-key"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "type": "string",
- "example": "base64",
- "format": "base64",
- "description": "Base64-encoded content of the DOCX file or downloadable file URL"
- },
- "fields": {
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1."
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.createTemplateFromHtml({
- html: `Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-`,
- name: "Test Template"
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from HTML",
- "operationId": "createTemplateFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML template of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML template of the footer to be displayed on every page."
- },
- "name": {
- "type": "string",
- "description": "Template name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
- "example": "714d974e-83d8-11ee-b962-0242ac120002"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Clone a template
-
-The API endpoint allows you to clone existing template into a new template.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.cloneTemplate(1000001, {
- name: "Cloned Template"
-});
-```
-
-```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 documents 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.",
- "example": "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.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.mergeTemplates({
- template_ids: [
- 321,
- 432
- ],
- name: "Merged Template"
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Merge templates",
- "operationId": "mergeTemplate",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_ids"
- ],
- "properties": {
- "template_ids": {
- "type": "array",
- "description": "An array of template ids to merge into a new template.",
- "items": {
- "type": "integer"
- },
- "example": [
- 321,
- 432
- ]
- },
- "name": {
- "type": "string",
- "description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
- "example": "Merged Template"
- },
- "folder_name": {
- "type": "string",
- "description": "The name of the folder in which the merged template should be placed."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to be used in the merged template.",
- "items": {
- "type": "string"
- },
- "example": [
- "Agent",
- "Customer"
- ]
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.updateTemplate(1000001, {
- name: "New Document Name",
- folder_name: "New Folder"
-});
-```
-
-```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",
- "example": "New Document Name"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be moved.",
- "example": "New Folder"
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to update the template with.",
- "items": {
- "type": "string"
- },
- "example": [
- "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.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.updateTemplateDocuments(1000001, {
- documents: [
- {
- file: "string"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Update template documents",
- "operationId": "addDocumentToTemplate",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the documents template.",
- "example": 1000001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "documents": {
- "type": "array",
- "description": "The list of documents to add or replace in the template.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "file": {
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
- },
- "html": {
- "type": "string",
- "description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
- },
- "position": {
- "type": "integer",
- "description": "Position of the document. By default will be added as the last document in the template.",
- "example": 0
- },
- "replace": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
- },
- "remove": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to remove existing document at given `position` or with given `name`."
- }
- }
- }
- },
- "merge": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a template
-
-The API endpoint allows you to archive a document template.
-
-```javascript
-const docuseal = require("@docuseal/api");
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-await docuseal.archiveTemplate(1000001);
-```
-
-```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
- }
- ]
-}
-```
-
diff --git a/docs/api/nodejs.md b/docs/api/nodejs.md
deleted file mode 100644
index c1e00c63..00000000
--- a/docs/api/nodejs.md
+++ /dev/null
@@ -1,4151 +0,0 @@
-### List all submissions
-
-The API endpoint provides the ability to retrieve a list of available submissions.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submissions", {
- method: "GET",
- headers: {
- "X-Auth-Token": "API_KEY"
- }
-});
-
-const { data, pagination } = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "List all submissions",
- "operationId": "getSubmissions",
- "parameters": [
- {
- "name": "template_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The template ID allows you to receive only the submissions created from that specific template."
- },
- {
- "name": "status",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "pending",
- "completed",
- "declined",
- "expired"
- ]
- },
- "description": "Filter submissions by status."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions based on submitters name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by unique slug.",
- "example": "NtLDQM7eJX2ZMd"
- },
- {
- "name": "template_folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by template folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Returns only archived submissions when `true` and only active submissions when `false`."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submissions to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."
- }
- ]
-}
-```
-
-### Get a submission
-
-The API endpoint provides the functionality to retrieve information about a submission.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submissions/1001", {
- method: "GET",
- headers: {
- "X-Auth-Token": "API_KEY"
- }
-});
-
-const submission = await resp.json();
-```
-
-```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.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submissions/1001/documents", {
- method: "GET",
- headers: {
- "X-Auth-Token": "API_KEY"
- }
-});
-
-const submission = await resp.json();
-```
-
-```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
- }
- ]
-}
-```
-
-### 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 Guides
Send documents for signature via API
Pre-fill PDF document form fields with API
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submissions", {
- method: "POST",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- template_id: 1000001,
- send_email: true,
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
- })
-});
-
-const submitters = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission",
- "operationId": "createSubmission",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_id",
- "submitters"
- ],
- "properties": {
- "template_id": {
- "type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
- "example": 1000001
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject for the submitter."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submissions/pdf", {
- method: "POST",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- 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: "john.doe@example.com"
- }
- ]
- })
-});
-
-const submission = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from PDF",
- "operationId": "createSubmissionFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- }
- }
- }
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submissions/docx", {
- method: "POST",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- name: "Test Submission Document",
- variables: {
- variable_name: "value"
- },
- documents: [
- {
- name: "string",
- file: "base64"
- }
- ],
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
- })
-});
-
-const submitters = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from DOCX",
- "operationId": "createSubmissionFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "variables": {
- "type": "object",
- "description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
- "example": {
- "variable_name": "value"
- }
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submissions/html", {
- method: "POST",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- name: "Test Submission Document",
- documents: [
- {
- name: "Test Document",
- html: `Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-`
- }
- ],
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
- })
-});
-
-const submission = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from HTML",
- "operationId": "createSubmissionFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- },
- "html": {
- "type": "string",
- "description": "HTML document content with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML document content of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML document content of the footer to be displayed on every page."
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a submission
-
-The API endpoint allows you to archive a submission.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submissions/1001", {
- method: "DELETE",
- headers: {
- "X-Auth-Token": "API_KEY"
- }
-});
-
-await resp.json();
-```
-
-```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.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submitters", {
- method: "GET",
- headers: {
- "X-Auth-Token": "API_KEY"
- }
-});
-
-const { data, pagination } = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "List all submitters",
- "operationId": "getSubmitters",
- "parameters": [
- {
- "name": "submission_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The submission ID allows you to receive only the submitters related to that specific submission."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters on name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters by unique slug.",
- "example": "zAyL9fH36Havvm"
- },
- {
- "name": "completed_after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-05 9:32:20",
- "description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
- },
- {
- "name": "completed_before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-06 19:32:20",
- "description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submitters to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a submitter
-
-The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submitters/500001", {
- method: "GET",
- headers: {
- "X-Auth-Token": "API_KEY"
- }
-});
-
-const submitter = await resp.json();
-```
-
-```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 Guides
Automatically sign documents via API
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/submitters/500001", {
- method: "PUT",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- email: "john.doe@example.com",
- fields: [
- {
- name: "First Name",
- default_value: "Acme"
- }
- ]
- })
-});
-
-const submitter = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "Update a submitter",
- "operationId": "updateSubmitter",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter.",
- "example": 500001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request emails."
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request via phone number SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### List all templates
-
-The API endpoint provides the ability to retrieve a list of available document templates.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/templates", {
- method: "GET",
- headers: {
- "X-Auth-Token": "API_KEY"
- }
-});
-
-const { data, pagination } = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "List all templates",
- "operationId": "getTemplates",
- "parameters": [
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates based on the name partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by unique slug.",
- "example": "opaKWh8WWTAcVG"
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."
- },
- {
- "name": "folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Get only archived templates instead of active ones."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of templates to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a template
-
-The API endpoint provides the functionality to retrieve information about a document template.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/templates/1000001", {
- method: "GET",
- headers: {
- "X-Auth-Token": "API_KEY"
- }
-});
-
-const template = await resp.json();
-```
-
-```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 Guides
Use embedded text field tags to create a fillable form
-
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/templates/pdf", {
- method: "POST",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- name: "Test PDF",
- documents: [
- {
- name: "string",
- file: "base64",
- fields: [
- {
- name: "string",
- areas: [
- {
- x: 0,
- y: 0,
- w: 0,
- h: 0,
- page: 1
- }
- ]
- }
- ]
- }
- ]
- })
-});
-
-const template = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from PDF",
- "operationId": "createTemplateFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test PDF"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
- "example": "unique-key"
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Create a template from Word DOCX
-
-The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/templates/docx", {
- method: "POST",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- name: "Test DOCX",
- documents: [
- {
- name: "string",
- file: "base64"
- }
- ]
- })
-});
-
-const template = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from Word DOCX",
- "operationId": "createTemplateFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test DOCX"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
- "example": "unique-key"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "type": "string",
- "example": "base64",
- "format": "base64",
- "description": "Base64-encoded content of the DOCX file or downloadable file URL"
- },
- "fields": {
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1."
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/templates/html", {
- method: "POST",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- html: `Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-`,
- name: "Test Template"
- })
-});
-
-const template = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from HTML",
- "operationId": "createTemplateFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML template of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML template of the footer to be displayed on every page."
- },
- "name": {
- "type": "string",
- "description": "Template name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
- "example": "714d974e-83d8-11ee-b962-0242ac120002"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Clone a template
-
-The API endpoint allows you to clone existing template into a new template.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/templates/1000001/clone", {
- method: "POST",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- name: "Cloned Template"
- })
-});
-
-const template = await resp.json();
-```
-
-```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 documents 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.",
- "example": "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.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/templates/merge", {
- method: "POST",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- template_ids: [
- 321,
- 432
- ],
- name: "Merged Template"
- })
-});
-
-const template = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Merge templates",
- "operationId": "mergeTemplate",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_ids"
- ],
- "properties": {
- "template_ids": {
- "type": "array",
- "description": "An array of template ids to merge into a new template.",
- "items": {
- "type": "integer"
- },
- "example": [
- 321,
- 432
- ]
- },
- "name": {
- "type": "string",
- "description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
- "example": "Merged Template"
- },
- "folder_name": {
- "type": "string",
- "description": "The name of the folder in which the merged template should be placed."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to be used in the merged template.",
- "items": {
- "type": "string"
- },
- "example": [
- "Agent",
- "Customer"
- ]
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/templates/1000001", {
- method: "PUT",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- name: "New Document Name",
- folder_name: "New Folder"
- })
-});
-
-const template = await resp.json();
-```
-
-```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",
- "example": "New Document Name"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be moved.",
- "example": "New Folder"
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to update the template with.",
- "items": {
- "type": "string"
- },
- "example": [
- "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.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/templates/1000001/documents", {
- method: "PUT",
- headers: {
- "X-Auth-Token": "API_KEY"
- },
- body: JSON.stringify({
- documents: [
- {
- file: "string"
- }
- ]
- })
-});
-
-const template = await resp.json();
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Update template documents",
- "operationId": "addDocumentToTemplate",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the documents template.",
- "example": 1000001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "documents": {
- "type": "array",
- "description": "The list of documents to add or replace in the template.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "file": {
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
- },
- "html": {
- "type": "string",
- "description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
- },
- "position": {
- "type": "integer",
- "description": "Position of the document. By default will be added as the last document in the template.",
- "example": 0
- },
- "replace": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
- },
- "remove": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to remove existing document at given `position` or with given `name`."
- }
- }
- }
- },
- "merge": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a template
-
-The API endpoint allows you to archive a document template.
-
-```nodejs
-const fetch = require("node-fetch");
-
-const resp = await fetch("https://api.docuseal.com/templates/1000001", {
- method: "DELETE",
- headers: {
- "X-Auth-Token": "API_KEY"
- }
-});
-
-await resp.json();
-```
-
-```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
- }
- ]
-}
-```
-
diff --git a/docs/api/php.md b/docs/api/php.md
deleted file mode 100644
index a56fe2ca..00000000
--- a/docs/api/php.md
+++ /dev/null
@@ -1,3992 +0,0 @@
-### List all submissions
-
-The API endpoint provides the ability to retrieve a list of available submissions.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->listSubmissions(['limit' => 10]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "List all submissions",
- "operationId": "getSubmissions",
- "parameters": [
- {
- "name": "template_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The template ID allows you to receive only the submissions created from that specific template."
- },
- {
- "name": "status",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "pending",
- "completed",
- "declined",
- "expired"
- ]
- },
- "description": "Filter submissions by status."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions based on submitters name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by unique slug.",
- "example": "NtLDQM7eJX2ZMd"
- },
- {
- "name": "template_folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by template folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Returns only archived submissions when `true` and only active submissions when `false`."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submissions to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."
- }
- ]
-}
-```
-
-### Get a submission
-
-The API endpoint provides the functionality to retrieve information about a submission.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->getSubmission(1001);
-```
-
-```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.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->getSubmissionDocuments(1001);
-```
-
-```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
- }
- ]
-}
-```
-
-### 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 Guides
Send documents for signature via API
Pre-fill PDF document form fields with API
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->createSubmission([
- 'template_id' => 1000001,
- 'send_email' => true,
- 'submitters' => [
- [
- 'role' => 'First Party',
- 'email' => 'john.doe@example.com'
- ]
- ]
-]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission",
- "operationId": "createSubmission",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_id",
- "submitters"
- ],
- "properties": {
- "template_id": {
- "type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
- "example": 1000001
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject for the submitter."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->createSubmissionFromPdf([
- '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' => 'john.doe@example.com'
- ]
- ]
-]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from PDF",
- "operationId": "createSubmissionFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- }
- }
- }
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->createSubmissionFromDocx([
- 'name' => 'Test Submission Document',
- 'variables' => [
- 'variable_name' => 'value'
- ],
- 'documents' => [
- [
- 'name' => 'string',
- 'file' => 'base64'
- ]
- ],
- 'submitters' => [
- [
- 'role' => 'First Party',
- 'email' => 'john.doe@example.com'
- ]
- ]
-]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from DOCX",
- "operationId": "createSubmissionFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "variables": {
- "type": "object",
- "description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
- "example": {
- "variable_name": "value"
- }
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->createSubmissionFromHtml([
- 'name' => 'Test Submission Document',
- 'documents' => [
- [
- 'name' => 'Test Document',
- 'html' => 'Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-'
- ]
- ],
- 'submitters' => [
- [
- 'role' => 'First Party',
- 'email' => 'john.doe@example.com'
- ]
- ]
-]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from HTML",
- "operationId": "createSubmissionFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- },
- "html": {
- "type": "string",
- "description": "HTML document content with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML document content of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML document content of the footer to be displayed on every page."
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a submission
-
-The API endpoint allows you to archive a submission.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->archiveSubmission(1001);
-```
-
-```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.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->listSubmitters(['limit' => 10]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "List all submitters",
- "operationId": "getSubmitters",
- "parameters": [
- {
- "name": "submission_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The submission ID allows you to receive only the submitters related to that specific submission."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters on name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters by unique slug.",
- "example": "zAyL9fH36Havvm"
- },
- {
- "name": "completed_after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-05 9:32:20",
- "description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
- },
- {
- "name": "completed_before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-06 19:32:20",
- "description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submitters to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a submitter
-
-The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->getSubmitter(500001);
-```
-
-```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 Guides
Automatically sign documents via API
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->updateSubmitter(500001, [
- 'email' => 'john.doe@example.com',
- 'fields' => [
- [
- 'name' => 'First Name',
- 'default_value' => 'Acme'
- ]
- ]
-]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "Update a submitter",
- "operationId": "updateSubmitter",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter.",
- "example": 500001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request emails."
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request via phone number SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### List all templates
-
-The API endpoint provides the ability to retrieve a list of available document templates.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->listTemplates(['limit' => 10]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "List all templates",
- "operationId": "getTemplates",
- "parameters": [
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates based on the name partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by unique slug.",
- "example": "opaKWh8WWTAcVG"
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."
- },
- {
- "name": "folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Get only archived templates instead of active ones."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of templates to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a template
-
-The API endpoint provides the functionality to retrieve information about a document template.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->getTemplate(1000001);
-```
-
-```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 Guides
Use embedded text field tags to create a fillable form
-
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->createTemplateFromPdf([
- 'name' => 'Test PDF',
- 'documents' => [
- [
- 'name' => 'string',
- 'file' => 'base64',
- 'fields' => [
- [
- 'name' => 'string',
- 'areas' => [
- [
- 'x' => 0,
- 'y' => 0,
- 'w' => 0,
- 'h' => 0,
- 'page' => 1
- ]
- ]
- ]
- ]
- ]
- ]
-]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from PDF",
- "operationId": "createTemplateFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test PDF"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
- "example": "unique-key"
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Create a template from Word DOCX
-
-The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->createTemplateFromDocx([
- 'name' => 'Test DOCX',
- 'documents' => [
- [
- 'name' => 'string',
- 'file' => 'base64'
- ]
- ]
-]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from Word DOCX",
- "operationId": "createTemplateFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test DOCX"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
- "example": "unique-key"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "type": "string",
- "example": "base64",
- "format": "base64",
- "description": "Base64-encoded content of the DOCX file or downloadable file URL"
- },
- "fields": {
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1."
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->createTemplateFromHtml([
- 'html' => 'Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-',
- 'name' => 'Test Template'
-]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from HTML",
- "operationId": "createTemplateFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML template of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML template of the footer to be displayed on every page."
- },
- "name": {
- "type": "string",
- "description": "Template name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
- "example": "714d974e-83d8-11ee-b962-0242ac120002"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Clone a template
-
-The API endpoint allows you to clone existing template into a new template.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->cloneTemplate(1000001, [
- 'name' => 'Cloned Template'
-]);
-```
-
-```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 documents 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.",
- "example": "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.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->mergeTemplates([
- 'template_ids' => [
- 321,
- 432
- ],
- 'name' => 'Merged Template'
-]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Merge templates",
- "operationId": "mergeTemplate",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_ids"
- ],
- "properties": {
- "template_ids": {
- "type": "array",
- "description": "An array of template ids to merge into a new template.",
- "items": {
- "type": "integer"
- },
- "example": [
- 321,
- 432
- ]
- },
- "name": {
- "type": "string",
- "description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
- "example": "Merged Template"
- },
- "folder_name": {
- "type": "string",
- "description": "The name of the folder in which the merged template should be placed."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to be used in the merged template.",
- "items": {
- "type": "string"
- },
- "example": [
- "Agent",
- "Customer"
- ]
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->updateTemplate(1000001, [
- 'name' => 'New Document Name',
- 'folder_name' => 'New Folder'
-]);
-```
-
-```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",
- "example": "New Document Name"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be moved.",
- "example": "New Folder"
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to update the template with.",
- "items": {
- "type": "string"
- },
- "example": [
- "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.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->updateTemplateDocuments(1000001, [
- 'documents' => [
- [
- 'file' => 'string'
- ]
- ]
-]);
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Update template documents",
- "operationId": "addDocumentToTemplate",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the documents template.",
- "example": 1000001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "documents": {
- "type": "array",
- "description": "The list of documents to add or replace in the template.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "file": {
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
- },
- "html": {
- "type": "string",
- "description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
- },
- "position": {
- "type": "integer",
- "description": "Position of the document. By default will be added as the last document in the template.",
- "example": 0
- },
- "replace": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
- },
- "remove": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to remove existing document at given `position` or with given `name`."
- }
- }
- }
- },
- "merge": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a template
-
-The API endpoint allows you to archive a document template.
-
-```php
-$docuseal = new \Docuseal\Api('API_KEY', 'https://api.docuseal.com');
-
-$docuseal->archiveTemplate(1000001);
-```
-
-```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
- }
- ]
-}
-```
-
diff --git a/docs/api/python.md b/docs/api/python.md
deleted file mode 100644
index 28940996..00000000
--- a/docs/api/python.md
+++ /dev/null
@@ -1,4055 +0,0 @@
-### List all submissions
-
-The API endpoint provides the ability to retrieve a list of available submissions.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.list_submissions({ "limit": 10 })
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "List all submissions",
- "operationId": "getSubmissions",
- "parameters": [
- {
- "name": "template_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The template ID allows you to receive only the submissions created from that specific template."
- },
- {
- "name": "status",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "pending",
- "completed",
- "declined",
- "expired"
- ]
- },
- "description": "Filter submissions by status."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions based on submitters name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by unique slug.",
- "example": "NtLDQM7eJX2ZMd"
- },
- {
- "name": "template_folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by template folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Returns only archived submissions when `true` and only active submissions when `false`."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submissions to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."
- }
- ]
-}
-```
-
-### Get a submission
-
-The API endpoint provides the functionality to retrieve information about a submission.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.get_submission(1001)
-```
-
-```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.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.get_submission_documents(1001)
-```
-
-```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
- }
- ]
-}
-```
-
-### 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 Guides
Send documents for signature via API
Pre-fill PDF document form fields with API
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.create_submission({
- "template_id": 1000001,
- "send_email": True,
- "submitters": [
- {
- "role": "First Party",
- "email": "john.doe@example.com"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission",
- "operationId": "createSubmission",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_id",
- "submitters"
- ],
- "properties": {
- "template_id": {
- "type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
- "example": 1000001
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject for the submitter."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.create_submission_from_pdf({
- "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": "john.doe@example.com"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from PDF",
- "operationId": "createSubmissionFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- }
- }
- }
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.create_submission_from_docx({
- "name": "Test Submission Document",
- "variables": {
- "variable_name": "value"
- },
- "documents": [
- {
- "name": "string",
- "file": "base64"
- }
- ],
- "submitters": [
- {
- "role": "First Party",
- "email": "john.doe@example.com"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from DOCX",
- "operationId": "createSubmissionFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "variables": {
- "type": "object",
- "description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
- "example": {
- "variable_name": "value"
- }
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.create_submission_from_html({
- "name": "Test Submission Document",
- "documents": [
- {
- "name": "Test Document",
- "html": """Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-"""
- }
- ],
- "submitters": [
- {
- "role": "First Party",
- "email": "john.doe@example.com"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from HTML",
- "operationId": "createSubmissionFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- },
- "html": {
- "type": "string",
- "description": "HTML document content with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML document content of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML document content of the footer to be displayed on every page."
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a submission
-
-The API endpoint allows you to archive a submission.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.archive_submission(1001)
-```
-
-```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.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.list_submissions({ "limit": 10 })
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "List all submitters",
- "operationId": "getSubmitters",
- "parameters": [
- {
- "name": "submission_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The submission ID allows you to receive only the submitters related to that specific submission."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters on name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters by unique slug.",
- "example": "zAyL9fH36Havvm"
- },
- {
- "name": "completed_after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-05 9:32:20",
- "description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
- },
- {
- "name": "completed_before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-06 19:32:20",
- "description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submitters to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a submitter
-
-The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.get_submitter(500001)
-```
-
-```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 Guides
Automatically sign documents via API
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.update_submitter(500001, {
- "email": "john.doe@example.com",
- "fields": [
- {
- "name": "First Name",
- "default_value": "Acme"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "Update a submitter",
- "operationId": "updateSubmitter",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter.",
- "example": 500001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request emails."
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request via phone number SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### List all templates
-
-The API endpoint provides the ability to retrieve a list of available document templates.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.list_submissions({ "limit": 10 })
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "List all templates",
- "operationId": "getTemplates",
- "parameters": [
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates based on the name partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by unique slug.",
- "example": "opaKWh8WWTAcVG"
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."
- },
- {
- "name": "folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Get only archived templates instead of active ones."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of templates to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a template
-
-The API endpoint provides the functionality to retrieve information about a document template.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.get_template(1000001)
-```
-
-```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 Guides
Use embedded text field tags to create a fillable form
-
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.create_template_from_pdf({
- "name": "Test PDF",
- "documents": [
- {
- "name": "string",
- "file": "base64",
- "fields": [
- {
- "name": "string",
- "areas": [
- {
- "x": 0,
- "y": 0,
- "w": 0,
- "h": 0,
- "page": 1
- }
- ]
- }
- ]
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from PDF",
- "operationId": "createTemplateFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test PDF"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
- "example": "unique-key"
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Create a template from Word DOCX
-
-The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.create_template_from_docx({
- "name": "Test DOCX",
- "documents": [
- {
- "name": "string",
- "file": "base64"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from Word DOCX",
- "operationId": "createTemplateFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test DOCX"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
- "example": "unique-key"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "type": "string",
- "example": "base64",
- "format": "base64",
- "description": "Base64-encoded content of the DOCX file or downloadable file URL"
- },
- "fields": {
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1."
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.create_template_from_html({
- "html": """Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-""",
- "name": "Test Template"
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from HTML",
- "operationId": "createTemplateFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML template of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML template of the footer to be displayed on every page."
- },
- "name": {
- "type": "string",
- "description": "Template name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
- "example": "714d974e-83d8-11ee-b962-0242ac120002"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Clone a template
-
-The API endpoint allows you to clone existing template into a new template.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.clone_template(1000001, {
- "name": "Cloned Template"
-})
-```
-
-```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 documents 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.",
- "example": "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.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.merge_templates({
- "template_ids": [
- 321,
- 432
- ],
- "name": "Merged Template"
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Merge templates",
- "operationId": "mergeTemplate",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_ids"
- ],
- "properties": {
- "template_ids": {
- "type": "array",
- "description": "An array of template ids to merge into a new template.",
- "items": {
- "type": "integer"
- },
- "example": [
- 321,
- 432
- ]
- },
- "name": {
- "type": "string",
- "description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
- "example": "Merged Template"
- },
- "folder_name": {
- "type": "string",
- "description": "The name of the folder in which the merged template should be placed."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to be used in the merged template.",
- "items": {
- "type": "string"
- },
- "example": [
- "Agent",
- "Customer"
- ]
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.update_template(1000001, {
- "name": "New Document Name",
- "folder_name": "New Folder"
-})
-```
-
-```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",
- "example": "New Document Name"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be moved.",
- "example": "New Folder"
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to update the template with.",
- "items": {
- "type": "string"
- },
- "example": [
- "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.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.update_template_documents(1000001, {
- "documents": [
- {
- "file": "string"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Update template documents",
- "operationId": "addDocumentToTemplate",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the documents template.",
- "example": 1000001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "documents": {
- "type": "array",
- "description": "The list of documents to add or replace in the template.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "file": {
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
- },
- "html": {
- "type": "string",
- "description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
- },
- "position": {
- "type": "integer",
- "description": "Position of the document. By default will be added as the last document in the template.",
- "example": 0
- },
- "replace": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
- },
- "remove": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to remove existing document at given `position` or with given `name`."
- }
- }
- }
- },
- "merge": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a template
-
-The API endpoint allows you to archive a document template.
-
-```python
-from docuseal import docuseal
-
-docuseal.key = "API_KEY"
-docuseal.url = "https://api.docuseal.com"
-
-docuseal.archive_template(1000001)
-```
-
-```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
- }
- ]
-}
-```
-
diff --git a/docs/api/ruby.md b/docs/api/ruby.md
deleted file mode 100644
index cb5a84aa..00000000
--- a/docs/api/ruby.md
+++ /dev/null
@@ -1,4055 +0,0 @@
-### List all submissions
-
-The API endpoint provides the ability to retrieve a list of available submissions.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.list_submissions(limit: 10)
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "List all submissions",
- "operationId": "getSubmissions",
- "parameters": [
- {
- "name": "template_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The template ID allows you to receive only the submissions created from that specific template."
- },
- {
- "name": "status",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "pending",
- "completed",
- "declined",
- "expired"
- ]
- },
- "description": "Filter submissions by status."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions based on submitters name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by unique slug.",
- "example": "NtLDQM7eJX2ZMd"
- },
- {
- "name": "template_folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by template folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Returns only archived submissions when `true` and only active submissions when `false`."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submissions to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."
- }
- ]
-}
-```
-
-### Get a submission
-
-The API endpoint provides the functionality to retrieve information about a submission.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.get_submission(1001)
-```
-
-```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.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.get_submission_documents(1001)
-```
-
-```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
- }
- ]
-}
-```
-
-### 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 Guides
Send documents for signature via API
Pre-fill PDF document form fields with API
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.create_submission({
- template_id: 1000001,
- send_email: true,
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission",
- "operationId": "createSubmission",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_id",
- "submitters"
- ],
- "properties": {
- "template_id": {
- "type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
- "example": 1000001
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject for the submitter."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.create_submission_from_pdf({
- 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: "john.doe@example.com"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from PDF",
- "operationId": "createSubmissionFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- }
- }
- }
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.create_submission_from_docx({
- name: "Test Submission Document",
- variables: {
- variable_name: "value"
- },
- documents: [
- {
- name: "string",
- file: "base64"
- }
- ],
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from DOCX",
- "operationId": "createSubmissionFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "variables": {
- "type": "object",
- "description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
- "example": {
- "variable_name": "value"
- }
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.create_submission_from_html({
- name: "Test Submission Document",
- documents: [
- {
- name: "Test Document",
- html: "Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-"
- }
- ],
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from HTML",
- "operationId": "createSubmissionFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- },
- "html": {
- "type": "string",
- "description": "HTML document content with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML document content of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML document content of the footer to be displayed on every page."
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a submission
-
-The API endpoint allows you to archive a submission.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.archive_submission(1001)
-```
-
-```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.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.list_submitters(limit: 10)
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "List all submitters",
- "operationId": "getSubmitters",
- "parameters": [
- {
- "name": "submission_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The submission ID allows you to receive only the submitters related to that specific submission."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters on name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters by unique slug.",
- "example": "zAyL9fH36Havvm"
- },
- {
- "name": "completed_after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-05 9:32:20",
- "description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
- },
- {
- "name": "completed_before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-06 19:32:20",
- "description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submitters to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a submitter
-
-The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.get_submitter(500001)
-```
-
-```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 Guides
Automatically sign documents via API
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.update_submitter(500001, {
- email: "john.doe@example.com",
- fields: [
- {
- name: "First Name",
- default_value: "Acme"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "Update a submitter",
- "operationId": "updateSubmitter",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter.",
- "example": 500001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request emails."
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request via phone number SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### List all templates
-
-The API endpoint provides the ability to retrieve a list of available document templates.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.list_templates(limit: 10)
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "List all templates",
- "operationId": "getTemplates",
- "parameters": [
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates based on the name partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by unique slug.",
- "example": "opaKWh8WWTAcVG"
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."
- },
- {
- "name": "folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Get only archived templates instead of active ones."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of templates to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a template
-
-The API endpoint provides the functionality to retrieve information about a document template.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.get_template(1000001)
-```
-
-```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 Guides
Use embedded text field tags to create a fillable form
-
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.create_template_from_pdf({
- name: "Test PDF",
- documents: [
- {
- name: "string",
- file: "base64",
- fields: [
- {
- name: "string",
- areas: [
- {
- x: 0,
- y: 0,
- w: 0,
- h: 0,
- page: 1
- }
- ]
- }
- ]
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from PDF",
- "operationId": "createTemplateFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test PDF"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
- "example": "unique-key"
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Create a template from Word DOCX
-
-The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.create_template_from_docx({
- name: "Test DOCX",
- documents: [
- {
- name: "string",
- file: "base64"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from Word DOCX",
- "operationId": "createTemplateFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test DOCX"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
- "example": "unique-key"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "type": "string",
- "example": "base64",
- "format": "base64",
- "description": "Base64-encoded content of the DOCX file or downloadable file URL"
- },
- "fields": {
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1."
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.create_template_from_html({
- html: "Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-",
- name: "Test Template"
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from HTML",
- "operationId": "createTemplateFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML template of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML template of the footer to be displayed on every page."
- },
- "name": {
- "type": "string",
- "description": "Template name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
- "example": "714d974e-83d8-11ee-b962-0242ac120002"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Clone a template
-
-The API endpoint allows you to clone existing template into a new template.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.clone_template(1000001, {
- name: "Cloned Template"
-})
-```
-
-```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 documents 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.",
- "example": "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.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.merge_templates({
- template_ids: [
- 321,
- 432
- ],
- name: "Merged Template"
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Merge templates",
- "operationId": "mergeTemplate",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_ids"
- ],
- "properties": {
- "template_ids": {
- "type": "array",
- "description": "An array of template ids to merge into a new template.",
- "items": {
- "type": "integer"
- },
- "example": [
- 321,
- 432
- ]
- },
- "name": {
- "type": "string",
- "description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
- "example": "Merged Template"
- },
- "folder_name": {
- "type": "string",
- "description": "The name of the folder in which the merged template should be placed."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to be used in the merged template.",
- "items": {
- "type": "string"
- },
- "example": [
- "Agent",
- "Customer"
- ]
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.update_template(1000001, {
- name: "New Document Name",
- folder_name: "New Folder"
-})
-```
-
-```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",
- "example": "New Document Name"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be moved.",
- "example": "New Folder"
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to update the template with.",
- "items": {
- "type": "string"
- },
- "example": [
- "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.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.update_template_documents(1000001, {
- documents: [
- {
- file: "string"
- }
- ]
-})
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Update template documents",
- "operationId": "addDocumentToTemplate",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the documents template.",
- "example": 1000001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "documents": {
- "type": "array",
- "description": "The list of documents to add or replace in the template.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "file": {
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
- },
- "html": {
- "type": "string",
- "description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
- },
- "position": {
- "type": "integer",
- "description": "Position of the document. By default will be added as the last document in the template.",
- "example": 0
- },
- "replace": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
- },
- "remove": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to remove existing document at given `position` or with given `name`."
- }
- }
- }
- },
- "merge": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a template
-
-The API endpoint allows you to archive a document template.
-
-```ruby
-require "docuseal"
-
-Docuseal.key = ENV["DOCUSEAL_API_KEY"]
-Docuseal.url = "https://api.docuseal.com"
-
-Docuseal.archive_template(1000001)
-```
-
-```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
- }
- ]
-}
-```
-
diff --git a/docs/api/shell.md b/docs/api/shell.md
deleted file mode 100644
index 1e0b6cf1..00000000
--- a/docs/api/shell.md
+++ /dev/null
@@ -1,3874 +0,0 @@
-### List all submissions
-
-The API endpoint provides the ability to retrieve a list of available submissions.
-
-```shell
-curl --request GET \
- --url https://api.docuseal.com/submissions \
- --header 'X-Auth-Token: API_KEY'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "List all submissions",
- "operationId": "getSubmissions",
- "parameters": [
- {
- "name": "template_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The template ID allows you to receive only the submissions created from that specific template."
- },
- {
- "name": "status",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "pending",
- "completed",
- "declined",
- "expired"
- ]
- },
- "description": "Filter submissions by status."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions based on submitters name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by unique slug.",
- "example": "NtLDQM7eJX2ZMd"
- },
- {
- "name": "template_folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by template folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Returns only archived submissions when `true` and only active submissions when `false`."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submissions to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."
- }
- ]
-}
-```
-
-### Get a submission
-
-The API endpoint provides the functionality to retrieve information about a submission.
-
-```shell
-curl --request GET \
- --url https://api.docuseal.com/submissions/1001 \
- --header 'X-Auth-Token: API_KEY'
-```
-
-```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.
-
-```shell
-curl --request GET \
- --url https://api.docuseal.com/submissions/1001/documents \
- --header 'X-Auth-Token: API_KEY'
-```
-
-```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
- }
- ]
-}
-```
-
-### 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 Guides
Send documents for signature via API
Pre-fill PDF document form fields with API
-
-```shell
-curl --request POST \
- --url https://api.docuseal.com/submissions \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"template_id":1000001,"send_email":true,"submitters":[{"role":"First Party","email":"john.doe@example.com"}]}'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission",
- "operationId": "createSubmission",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_id",
- "submitters"
- ],
- "properties": {
- "template_id": {
- "type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
- "example": 1000001
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject for the submitter."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```shell
-curl --request POST \
- --url https://api.docuseal.com/submissions/pdf \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"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":"john.doe@example.com"}]}'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from PDF",
- "operationId": "createSubmissionFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- }
- }
- }
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents
-
-```shell
-curl --request POST \
- --url https://api.docuseal.com/submissions/docx \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"name":"Test Submission Document","variables":{"variable_name":"value"},"documents":[{"name":"string","file":"base64"}],"submitters":[{"role":"First Party","email":"john.doe@example.com"}]}'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from DOCX",
- "operationId": "createSubmissionFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "variables": {
- "type": "object",
- "description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
- "example": {
- "variable_name": "value"
- }
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```shell
-curl --request POST \
- --url https://api.docuseal.com/submissions/html \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"name":"Test Submission Document","documents":[{"name":"Test Document","html":"Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"}],"submitters":[{"role":"First Party","email":"john.doe@example.com"}]}'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from HTML",
- "operationId": "createSubmissionFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- },
- "html": {
- "type": "string",
- "description": "HTML document content with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML document content of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML document content of the footer to be displayed on every page."
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a submission
-
-The API endpoint allows you to archive a submission.
-
-```shell
-curl --request DELETE \
- --url https://api.docuseal.com/submissions/1001 \
- --header 'X-Auth-Token: API_KEY'
-```
-
-```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.
-
-```shell
-curl --request GET \
- --url https://api.docuseal.com/submitters \
- --header 'X-Auth-Token: API_KEY'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "List all submitters",
- "operationId": "getSubmitters",
- "parameters": [
- {
- "name": "submission_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The submission ID allows you to receive only the submitters related to that specific submission."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters on name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters by unique slug.",
- "example": "zAyL9fH36Havvm"
- },
- {
- "name": "completed_after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-05 9:32:20",
- "description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
- },
- {
- "name": "completed_before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-06 19:32:20",
- "description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submitters to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a submitter
-
-The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.
-
-```shell
-curl --request GET \
- --url https://api.docuseal.com/submitters/500001 \
- --header 'X-Auth-Token: API_KEY'
-```
-
-```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 Guides
Automatically sign documents via API
-
-```shell
-curl --request PUT \
- --url https://api.docuseal.com/submitters/500001 \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"email":"john.doe@example.com","fields":[{"name":"First Name","default_value":"Acme"}]}'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "Update a submitter",
- "operationId": "updateSubmitter",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter.",
- "example": 500001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request emails."
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request via phone number SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### List all templates
-
-The API endpoint provides the ability to retrieve a list of available document templates.
-
-```shell
-curl --request GET \
- --url https://api.docuseal.com/templates \
- --header 'X-Auth-Token: API_KEY'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "List all templates",
- "operationId": "getTemplates",
- "parameters": [
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates based on the name partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by unique slug.",
- "example": "opaKWh8WWTAcVG"
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."
- },
- {
- "name": "folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Get only archived templates instead of active ones."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of templates to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a template
-
-The API endpoint provides the functionality to retrieve information about a document template.
-
-```shell
-curl --request GET \
- --url https://api.docuseal.com/templates/1000001 \
- --header 'X-Auth-Token: API_KEY'
-```
-
-```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 Guides
Use embedded text field tags to create a fillable form
-
-
-```shell
-curl --request POST \
- --url https://api.docuseal.com/templates/pdf \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"name":"Test PDF","documents":[{"name":"string","file":"base64","fields":[{"name":"string","areas":[{"x":0,"y":0,"w":0,"h":0,"page":1}]}]}]}'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from PDF",
- "operationId": "createTemplateFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test PDF"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
- "example": "unique-key"
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Create a template from Word DOCX
-
-The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```shell
-curl --request POST \
- --url https://api.docuseal.com/templates/docx \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"name":"Test DOCX","documents":[{"name":"string","file":"base64"}]}'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from Word DOCX",
- "operationId": "createTemplateFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test DOCX"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
- "example": "unique-key"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "type": "string",
- "example": "base64",
- "format": "base64",
- "description": "Base64-encoded content of the DOCX file or downloadable file URL"
- },
- "fields": {
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1."
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```shell
-curl --request POST \
- --url https://api.docuseal.com/templates/html \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"html":"Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n","name":"Test Template"}'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from HTML",
- "operationId": "createTemplateFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML template of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML template of the footer to be displayed on every page."
- },
- "name": {
- "type": "string",
- "description": "Template name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
- "example": "714d974e-83d8-11ee-b962-0242ac120002"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Clone a template
-
-The API endpoint allows you to clone existing template into a new template.
-
-```shell
-curl --request POST \
- --url https://api.docuseal.com/templates/1000001/clone \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"name":"Cloned Template"}'
-```
-
-```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 documents 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.",
- "example": "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.
-
-```shell
-curl --request POST \
- --url https://api.docuseal.com/templates/merge \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"template_ids":[321,432],"name":"Merged Template"}'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Merge templates",
- "operationId": "mergeTemplate",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_ids"
- ],
- "properties": {
- "template_ids": {
- "type": "array",
- "description": "An array of template ids to merge into a new template.",
- "items": {
- "type": "integer"
- },
- "example": [
- 321,
- 432
- ]
- },
- "name": {
- "type": "string",
- "description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
- "example": "Merged Template"
- },
- "folder_name": {
- "type": "string",
- "description": "The name of the folder in which the merged template should be placed."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to be used in the merged template.",
- "items": {
- "type": "string"
- },
- "example": [
- "Agent",
- "Customer"
- ]
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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.
-
-```shell
-curl --request PUT \
- --url https://api.docuseal.com/templates/1000001 \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"name":"New Document Name","folder_name":"New Folder"}'
-```
-
-```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",
- "example": "New Document Name"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be moved.",
- "example": "New Folder"
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to update the template with.",
- "items": {
- "type": "string"
- },
- "example": [
- "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.
-
-```shell
-curl --request PUT \
- --url https://api.docuseal.com/templates/1000001/documents \
- --header 'X-Auth-Token: API_KEY' \
- --header 'content-type: application/json' \
- --data '{"documents":[{"file":"string"}]}'
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Update template documents",
- "operationId": "addDocumentToTemplate",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the documents template.",
- "example": 1000001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "documents": {
- "type": "array",
- "description": "The list of documents to add or replace in the template.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "file": {
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
- },
- "html": {
- "type": "string",
- "description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
- },
- "position": {
- "type": "integer",
- "description": "Position of the document. By default will be added as the last document in the template.",
- "example": 0
- },
- "replace": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
- },
- "remove": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to remove existing document at given `position` or with given `name`."
- }
- }
- }
- },
- "merge": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a template
-
-The API endpoint allows you to archive a document template.
-
-```shell
-curl --request DELETE \
- --url https://api.docuseal.com/templates/1000001 \
- --header 'X-Auth-Token: API_KEY'
-```
-
-```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
- }
- ]
-}
-```
-
diff --git a/docs/api/typescript.md b/docs/api/typescript.md
deleted file mode 100644
index 997ed02d..00000000
--- a/docs/api/typescript.md
+++ /dev/null
@@ -1,4034 +0,0 @@
-### List all submissions
-
-The API endpoint provides the ability to retrieve a list of available submissions.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const { data, pagination } = await docuseal.listSubmissions({ limit: 10 });
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "List all submissions",
- "operationId": "getSubmissions",
- "parameters": [
- {
- "name": "template_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The template ID allows you to receive only the submissions created from that specific template."
- },
- {
- "name": "status",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "enum": [
- "pending",
- "completed",
- "declined",
- "expired"
- ]
- },
- "description": "Filter submissions by status."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions based on submitters name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by unique slug.",
- "example": "NtLDQM7eJX2ZMd"
- },
- {
- "name": "template_folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submissions by template folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Returns only archived submissions when `true` and only active submissions when `false`."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submissions to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."
- }
- ]
-}
-```
-
-### Get a submission
-
-The API endpoint provides the functionality to retrieve information about a submission.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.getSubmission(1001);
-```
-
-```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.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.getSubmissionDocuments(1001);
-```
-
-```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
- }
- ]
-}
-```
-
-### 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 Guides
Send documents for signature via API
Pre-fill PDF document form fields with API
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.createSubmission({
- template_id: 1000001,
- send_email: true,
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission",
- "operationId": "createSubmission",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_id",
- "submitters"
- ],
- "properties": {
- "template_id": {
- "type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
- "example": 1000001
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject for the submitter."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.createSubmissionFromPdf({
- 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: "john.doe@example.com"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from PDF",
- "operationId": "createSubmissionFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- }
- }
- }
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.createSubmissionFromDocx({
- name: "Test Submission Document",
- variables: {
- variable_name: "value"
- },
- documents: [
- {
- name: "string",
- file: "base64"
- }
- ],
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from DOCX",
- "operationId": "createSubmissionFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission.",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "variables": {
- "type": "object",
- "description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
- "example": {
- "variable_name": "value"
- }
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submission = await docuseal.createSubmissionFromHtml({
- name: "Test Submission Document",
- documents: [
- {
- name: "Test Document",
- html: `Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-`
- }
- ],
- submitters: [
- {
- role: "First Party",
- email: "john.doe@example.com"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submissions"
- ],
- "summary": "Create a submission from HTML",
- "operationId": "createSubmissionFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents",
- "submitters"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document submission",
- "example": "Test Submission Document"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "order": {
- "type": "string",
- "description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
- "default": "preserved",
- "enum": [
- "preserved",
- "random"
- ]
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Specify URL to redirect to after the submission completion."
- },
- "bcc_completed": {
- "type": "string",
- "description": "Specify BCC address to send signed documents to after the completion."
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "expire_at": {
- "type": "string",
- "description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
- "example": "2024-09-01 12:00:00 UTC"
- },
- "template_ids": {
- "type": "array",
- "description": "An optional array of template IDs to use in the submission along with the provided documents. This can be used to create multi-document submissions when some of the required documents exist within templates.",
- "items": {
- "type": "integer",
- "description": "The ID of the template to use for the submission."
- }
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a submission with multiple documents.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- },
- "html": {
- "type": "string",
- "description": "HTML document content with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML document content of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML document content of the footer to be displayed on every page."
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "position": {
- "type": "integer",
- "description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
- }
- }
- }
- },
- "submitters": {
- "type": "array",
- "description": "The list of submitters for the submission.",
- "items": {
- "type": "object",
- "required": [
- "email"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "role": {
- "type": "string",
- "description": "The role name or title of the submitter.",
- "example": "First Party"
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `false` to disable signature request emails sending only for this submitter.",
- "default": true
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to send signature request via phone number and SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails for this submitter."
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "order": {
- "type": "integer",
- "description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "require_email_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
- "default": false
- },
- "invite_by": {
- "type": "string",
- "description": "Set the role name of the previous party that should invite this party via email."
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- },
- "roles": {
- "type": "array",
- "description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "merge_documents": {
- "type": "boolean",
- "description": "Set `true` to merge the documents into a single PDF file.",
- "default": false
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a submission
-
-The API endpoint allows you to archive a submission.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-await docuseal.archiveSubmission(1001);
-```
-
-```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.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const { data, pagination } = await docuseal.listSubmitters({ limit: 10 });
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "List all submitters",
- "operationId": "getSubmitters",
- "parameters": [
- {
- "name": "submission_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The submission ID allows you to receive only the submitters related to that specific submission."
- },
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters on name, email or phone partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter submitters by unique slug.",
- "example": "zAyL9fH36Havvm"
- },
- {
- "name": "completed_after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-05 9:32:20",
- "description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
- },
- {
- "name": "completed_before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string",
- "format": "date-time"
- },
- "example": "2024-03-06 19:32:20",
- "description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of submitters to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a submitter
-
-The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submitter = await docuseal.getSubmitter(500001);
-```
-
-```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 Guides
Automatically sign documents via API
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const submitter = await docuseal.updateSubmitter(500001, {
- email: "john.doe@example.com",
- fields: [
- {
- name: "First Name",
- default_value: "Acme"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Submitters"
- ],
- "summary": "Update a submitter",
- "operationId": "updateSubmitter",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the submitter.",
- "example": 500001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the submitter."
- },
- "email": {
- "type": "string",
- "description": "The email address of the submitter.",
- "format": "email",
- "example": "john.doe@example.com"
- },
- "phone": {
- "type": "string",
- "description": "The phone number of the submitter, formatted according to the E.164 standard.",
- "example": "+1234567890"
- },
- "values": {
- "type": "object",
- "description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "send_email": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request emails."
- },
- "send_sms": {
- "type": "boolean",
- "description": "Set `true` to re-send signature request via phone number SMS.",
- "default": false
- },
- "reply_to": {
- "type": "string",
- "description": "Specify Reply-To address to use in the notification emails."
- },
- "completed": {
- "type": "boolean",
- "description": "Pass `true` to mark submitter as completed and auto-signed via API."
- },
- "metadata": {
- "type": "object",
- "description": "Metadata object with additional submitter information.",
- "example": "{ \"customField\": \"value\" }"
- },
- "completed_redirect_url": {
- "type": "string",
- "description": "Submitter specific URL to redirect to after the submission completion."
- },
- "require_phone_2fa": {
- "type": "boolean",
- "description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
- "default": false
- },
- "message": {
- "type": "object",
- "properties": {
- "subject": {
- "type": "string",
- "description": "Custom signature request email subject."
- },
- "body": {
- "type": "string",
- "description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
- }
- }
- },
- "fields": {
- "type": "array",
- "description": "A list of configurations for template document form fields.",
- "items": {
- "type": "object",
- "required": [
- "name"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Document template field name.",
- "example": "First Name"
- },
- "default_value": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- },
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
- }
- ],
- "description": "Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.",
- "example": "Acme"
- },
- "readonly": {
- "type": "boolean",
- "description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
- "default": false
- },
- "required": {
- "type": "boolean",
- "description": "Set `true` to make the field required."
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### List all templates
-
-The API endpoint provides the ability to retrieve a list of available document templates.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const { data, pagination } = await docuseal.listTemplates({ limit: 10 });
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "List all templates",
- "operationId": "getTemplates",
- "parameters": [
- {
- "name": "q",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates based on the name partial match."
- },
- {
- "name": "slug",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by unique slug.",
- "example": "opaKWh8WWTAcVG"
- },
- {
- "name": "external_id",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "The unique applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."
- },
- {
- "name": "folder",
- "in": "query",
- "required": false,
- "schema": {
- "type": "string"
- },
- "description": "Filter templates by folder name."
- },
- {
- "name": "archived",
- "in": "query",
- "required": false,
- "schema": {
- "type": "boolean"
- },
- "description": "Get only archived templates instead of active ones."
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The number of templates to return. Default value is 10. Maximum value is 100."
- },
- {
- "name": "after",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
- },
- {
- "name": "before",
- "in": "query",
- "required": false,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."
- }
- ]
-}
-```
-
-### Get a template
-
-The API endpoint provides the functionality to retrieve information about a document template.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.getTemplate(1000001);
-```
-
-```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 Guides
Use embedded text field tags to create a fillable form
-
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.createTemplateFromPdf({
- name: "Test PDF",
- documents: [
- {
- name: "string",
- file: "base64",
- fields: [
- {
- name: "string",
- areas: [
- {
- x: 0,
- y: 0,
- w: 0,
- h: 0,
- page: 1
- }
- ]
- }
- ]
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from PDF",
- "operationId": "createTemplateFromPdf",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test PDF"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new PDF.",
- "example": "unique-key"
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "example": "base64",
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF file or downloadable file URL."
- },
- "fields": {
- "type": "array",
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "x",
- "y",
- "w",
- "h",
- "page"
- ],
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1.",
- "example": 1
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the documents.",
- "default": false
- },
- "remove_tags": {
- "type": "boolean",
- "description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
- "default": true
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Create a template from Word DOCX
-
-The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use embedded text field tags to create a fillable form
-
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.createTemplateFromDocx({
- name: "Test DOCX",
- documents: [
- {
- name: "string",
- file: "base64"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from Word DOCX",
- "operationId": "createTemplateFromDocx",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "documents"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the template",
- "example": "Test DOCX"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
- "example": "unique-key"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "items": {
- "type": "object",
- "required": [
- "name",
- "file"
- ],
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the document."
- },
- "file": {
- "type": "string",
- "example": "base64",
- "format": "base64",
- "description": "Base64-encoded content of the DOCX file or downloadable file URL"
- },
- "fields": {
- "description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Name of the field."
- },
- "type": {
- "type": "string",
- "description": "Type of the field (e.g., text, signature, date, initials).",
- "enum": [
- "heading",
- "text",
- "signature",
- "initials",
- "date",
- "number",
- "image",
- "checkbox",
- "multiple",
- "file",
- "radio",
- "select",
- "cells",
- "stamp",
- "payment",
- "phone",
- "verification",
- "strikethrough"
- ]
- },
- "role": {
- "type": "string",
- "description": "Role name of the signer."
- },
- "required": {
- "type": "boolean",
- "description": "Indicates if the field is required."
- },
- "title": {
- "type": "string",
- "description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
- },
- "description": {
- "type": "string",
- "description": "Field description displayed on the signing form. Supports Markdown."
- },
- "areas": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "x": {
- "type": "number",
- "description": "X-coordinate of the field area."
- },
- "y": {
- "type": "number",
- "description": "Y-coordinate of the field area."
- },
- "w": {
- "type": "number",
- "description": "Width of the field area."
- },
- "h": {
- "type": "number",
- "description": "Height of the field area."
- },
- "page": {
- "type": "integer",
- "description": "Page number of the field area. Starts from 1."
- },
- "option": {
- "type": "string",
- "description": "Option string value for 'radio' and 'multiple' select field types."
- }
- }
- }
- },
- "options": {
- "type": "array",
- "description": "An array of option values for 'select' field type.",
- "items": {
- "type": "string"
- },
- "example": [
- "Option A",
- "Option B"
- ]
- },
- "validation": {
- "type": "object",
- "properties": {
- "pattern": {
- "type": "string",
- "description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
- "example": "[A-Z]{4}"
- },
- "message": {
- "type": "string",
- "description": "A custom error message to display on validation failure."
- },
- "min": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Minimum allowed number value or date depending on field type."
- },
- "max": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "string"
- }
- ],
- "description": "Maximum allowed number value or date depending on field type."
- },
- "step": {
- "type": "number",
- "description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
- }
- }
- },
- "preferences": {
- "type": "object",
- "properties": {
- "font_size": {
- "type": "integer",
- "description": "Font size of the field value in pixels.",
- "example": 12
- },
- "font_type": {
- "type": "string",
- "description": "Font type of the field value.",
- "enum": [
- "bold",
- "italic",
- "bold_italic"
- ]
- },
- "font": {
- "type": "string",
- "description": "Font family of the field value.",
- "enum": [
- "Times",
- "Helvetica",
- "Courier"
- ]
- },
- "color": {
- "type": "string",
- "description": "Font color of the field value.",
- "enum": [
- "black",
- "white",
- "blue"
- ],
- "default": "black"
- },
- "background": {
- "type": "string",
- "description": "Field box background color.",
- "enum": [
- "black",
- "white",
- "blue"
- ]
- },
- "align": {
- "type": "string",
- "description": "Horizontal alignment of the field text value.",
- "enum": [
- "left",
- "center",
- "right"
- ],
- "default": "left"
- },
- "valign": {
- "type": "string",
- "description": "Vertical alignment of the field text value.",
- "enum": [
- "top",
- "center",
- "bottom"
- ],
- "default": "center"
- },
- "format": {
- "type": "string",
- "description": "The data format for different field types.
- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).
- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.
- Number field: accepts currency formats such as usd, eur, gbp.",
- "example": "DD/MM/YYYY"
- },
- "price": {
- "type": "number",
- "description": "Price value of the payment field. Only for payment fields.",
- "example": 99.99
- },
- "currency": {
- "type": "string",
- "description": "Currency value of the payment field. Only for payment fields.",
- "enum": [
- "USD",
- "EUR",
- "GBP",
- "CAD",
- "AUD"
- ],
- "default": "USD"
- },
- "mask": {
- "description": "Set `true` to make sensitive data masked on the document.",
- "oneOf": [
- {
- "type": "integer"
- },
- {
- "type": "boolean"
- }
- ],
- "default": false
- },
- "reasons": {
- "description": "An array of signature reasons to choose from.",
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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 Guides
Create PDF document fillable form with HTML
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.createTemplateFromHtml({
- html: `Lorem Ipsum is simply dummy text of the
-
-
-and typesetting industry
-`,
- name: "Test Template"
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Create a template from HTML",
- "operationId": "createTemplateFromHtml",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "html_header": {
- "type": "string",
- "description": "HTML template of the header to be displayed on every page."
- },
- "html_footer": {
- "type": "string",
- "description": "HTML template of the footer to be displayed on every page."
- },
- "name": {
- "type": "string",
- "description": "Template name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "size": {
- "type": "string",
- "default": "Letter",
- "description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
- "enum": [
- "Letter",
- "Legal",
- "Tabloid",
- "Ledger",
- "A0",
- "A1",
- "A2",
- "A3",
- "A4",
- "A5",
- "A6"
- ],
- "example": "A4"
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
- "example": "714d974e-83d8-11ee-b962-0242ac120002"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be created."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "documents": {
- "type": "array",
- "description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
- "items": {
- "type": "object",
- "required": [
- "html"
- ],
- "properties": {
- "html": {
- "type": "string",
- "description": "HTML template with field tags.",
- "example": "Lorem Ipsum is simply dummy text of the\n\n \nand typesetting industry
\n"
- },
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Document"
- }
- }
- }
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Clone a template
-
-The API endpoint allows you to clone existing template into a new template.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.cloneTemplate(1000001, {
- name: "Cloned Template"
-});
-```
-
-```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 documents 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.",
- "example": "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.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.mergeTemplates({
- template_ids: [
- 321,
- 432
- ],
- name: "Merged Template"
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Merge templates",
- "operationId": "mergeTemplate",
- "parameters": [],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "template_ids"
- ],
- "properties": {
- "template_ids": {
- "type": "array",
- "description": "An array of template ids to merge into a new template.",
- "items": {
- "type": "integer"
- },
- "example": [
- 321,
- 432
- ]
- },
- "name": {
- "type": "string",
- "description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
- "example": "Merged Template"
- },
- "folder_name": {
- "type": "string",
- "description": "The name of the folder in which the merged template should be placed."
- },
- "external_id": {
- "type": "string",
- "description": "Your application-specific unique string key to identify this template within your app."
- },
- "shared_link": {
- "type": "boolean",
- "description": "set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
- "default": true
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to be used in the merged template.",
- "items": {
- "type": "string"
- },
- "example": [
- "Agent",
- "Customer"
- ]
- }
- }
- }
- }
- }
- }
-}
-```
-
-### 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.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.updateTemplate(1000001, {
- name: "New Document Name",
- folder_name: "New Folder"
-});
-```
-
-```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",
- "example": "New Document Name"
- },
- "folder_name": {
- "type": "string",
- "description": "The folder's name to which the template should be moved.",
- "example": "New Folder"
- },
- "roles": {
- "type": "array",
- "description": "An array of submitter role names to update the template with.",
- "items": {
- "type": "string"
- },
- "example": [
- "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.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-const template = await docuseal.updateTemplateDocuments(1000001, {
- documents: [
- {
- file: "string"
- }
- ]
-});
-```
-
-```json
-{
- "security": [
- {
- "AuthToken": []
- }
- ],
- "tags": [
- "Templates"
- ],
- "summary": "Update template documents",
- "operationId": "addDocumentToTemplate",
- "parameters": [
- {
- "name": "id",
- "in": "path",
- "required": true,
- "schema": {
- "type": "integer"
- },
- "description": "The unique identifier of the documents template.",
- "example": 1000001
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "documents": {
- "type": "array",
- "description": "The list of documents to add or replace in the template.",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "Document name. Random uuid will be assigned when not specified.",
- "example": "Test Template"
- },
- "file": {
- "type": "string",
- "format": "base64",
- "description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
- },
- "html": {
- "type": "string",
- "description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
- },
- "position": {
- "type": "integer",
- "description": "Position of the document. By default will be added as the last document in the template.",
- "example": 0
- },
- "replace": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
- },
- "remove": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to remove existing document at given `position` or with given `name`."
- }
- }
- }
- },
- "merge": {
- "type": "boolean",
- "default": false,
- "description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
- }
- }
- }
- }
- }
- }
-}
-```
-
-### Archive a template
-
-The API endpoint allows you to archive a document template.
-
-```typescript
-import docuseal from "@docuseal/api";
-
-docuseal.configure({ key: "API_KEY", url: "https://api.docuseal.com" });
-
-await docuseal.archiveTemplate(1000001);
-```
-
-```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
- }
- ]
-}
-```
-
diff --git a/docs/embedding/form-builder-javascript.md b/docs/embedding/form-builder-javascript.md
index 9d863bd5..9867439d 100644
--- a/docs/embedding/form-builder-javascript.md
+++ b/docs/embedding/form-builder-javascript.md
@@ -3,7 +3,7 @@
### Example Code
```javascript
-
+
@@ -162,7 +162,7 @@ export class AppComponent {}
"type": "string",
"required": false,
"description": "URL to redirect to after the submission completion.",
- "example": "https://docuseal.com/success"
+ "example": "https://sign.wabo.cc/success"
},
"completedMessage": {
"type": "object",
diff --git a/docs/embedding/signing-form-javascript.md b/docs/embedding/signing-form-javascript.md
index b0ccf4b9..52b60e32 100644
--- a/docs/embedding/signing-form-javascript.md
+++ b/docs/embedding/signing-form-javascript.md
@@ -3,11 +3,11 @@
### Example Code
```javascript
-
+
@@ -240,7 +240,7 @@
"type": "string",
"required": false,
"description": "URL to redirect to after the submission completion.",
- "example": "https://docuseal.com/success"
+ "example": "https://sign.wabo.cc/success"
},
"data-completed-message-title": {
"type": "string",
diff --git a/docs/embedding/signing-form-react.md b/docs/embedding/signing-form-react.md
index 949adb43..622dad4f 100644
--- a/docs/embedding/signing-form-react.md
+++ b/docs/embedding/signing-form-react.md
@@ -10,7 +10,7 @@ export function App() {
return (
console.log(data)}
/>
@@ -159,7 +159,7 @@ export function App() {
"type": "string",
"required": false,
"description": "URL to redirect to after the submission completion.",
- "example": "https://docuseal.com/success"
+ "example": "https://sign.wabo.cc/success"
},
"completedMessage": {
"type": "object",
diff --git a/docs/embedding/signing-form-vue.md b/docs/embedding/signing-form-vue.md
index 6014da83..1b10c87d 100644
--- a/docs/embedding/signing-form-vue.md
+++ b/docs/embedding/signing-form-vue.md
@@ -5,7 +5,7 @@
```vue
@@ -227,7 +227,7 @@ export default {
"type": "string",
"required": false,
"description": "URL to redirect to after the submission completion.",
- "example": "https://docuseal.com/success"
+ "example": "https://sign.wabo.cc/success"
},
"completed-message": {
"type": "object",
diff --git a/docs/openapi.json b/docs/openapi.json
index 2345eee8..f503f9d3 100644
--- a/docs/openapi.json
+++ b/docs/openapi.json
@@ -572,8 +572,8 @@
{
"id": 5,
"uuid": "d94e615f-76e3-46d5-8f98-36bdacb8664a",
- "url": "https://docuseal.com/file/hash/sample-document.pdf",
- "preview_image_url": "https://docuseal.com/file/hash/0.jpg",
+ "url": "https://sign.wabo.cc/file/hash/sample-document.pdf",
+ "preview_image_url": "https://sign.wabo.cc/file/hash/0.jpg",
"filename": "example-document.pdf"
}
]
@@ -1018,8 +1018,8 @@
{
"id": 5,
"uuid": "d94e615f-76e3-46d5-8f98-36bdacb8664a",
- "url": "https://docuseal.com/file/hash/sample-document.pdf",
- "preview_image_url": "https://docuseal.com/file/hash/0.jpg",
+ "url": "https://sign.wabo.cc/file/hash/sample-document.pdf",
+ "preview_image_url": "https://sign.wabo.cc/file/hash/0.jpg",
"filename": "example-document.pdf"
}
]
@@ -1600,7 +1600,7 @@
"submitters_order": "random",
"slug": "VyL4szTwYoSvXq",
"status": "completed",
- "audit_log_url": "https://docuseal.com/file/hash/example.pdf",
+ "audit_log_url": "https://sign.wabo.cc/file/hash/example.pdf",
"combined_document_url": null,
"expire_at": null,
"completed_at": "2023-12-10T15:49:21.895Z",
@@ -1665,7 +1665,7 @@
"Submissions"
],
"summary": "Create a submission",
- "description": "This API endpoint allows you to create signature requests (submissions) for a document template and send them to the specified submitters (signers).
Related Guides
Send documents for signature via API
Pre-fill PDF document form fields with API",
+ "description": "This API endpoint allows you to create signature requests (submissions) for a document template and send them to the specified submitters (signers).
Related Guides
Send documents for signature via API
Pre-fill PDF document form fields with API",
"operationId": "createSubmission",
"parameters": [],
"requestBody": {
@@ -1681,7 +1681,7 @@
"properties": {
"template_id": {
"type": "integer",
- "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
+ "description": "The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.",
"example": 1000001
},
"send_email": {
@@ -2264,7 +2264,7 @@
"send_sms": false
},
"role": "First Party",
- "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ "embed_src": "https://sign.wabo.cc/s/pAMimKcyrLjqVt"
}
]
}
@@ -2723,7 +2723,7 @@
"source": "link",
"submitters_order": "random",
"slug": "VyL4szTwYoSvXq",
- "audit_log_url": "https://docuseal.com/blobs/proxy/hash/example.pdf",
+ "audit_log_url": "https://sign.wabo.cc/blobs/proxy/hash/example.pdf",
"combined_document_url": null,
"completed_at": "2023-12-14T15:49:21.701Z",
"expire_at": null,
@@ -2757,7 +2757,7 @@
"documents": [
{
"name": "example",
- "url": "https://docuseal.com/blobs/proxy/hash/example.pdf"
+ "url": "https://sign.wabo.cc/blobs/proxy/hash/example.pdf"
}
],
"role": "First Party"
@@ -2789,7 +2789,7 @@
"documents": [
{
"name": "example",
- "url": "https://docuseal.com/file/hash/example.pdf"
+ "url": "https://sign.wabo.cc/file/hash/example.pdf"
}
],
"status": "completed"
@@ -2924,7 +2924,7 @@
"documents": [
{
"name": "example",
- "url": "https://docuseal.com/file/hash/example.pdf"
+ "url": "https://sign.wabo.cc/file/hash/example.pdf"
}
]
}
@@ -3204,7 +3204,7 @@
"send_sms": false
},
"role": "First Party",
- "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ "embed_src": "https://sign.wabo.cc/s/pAMimKcyrLjqVt"
},
{
"id": 2,
@@ -3256,7 +3256,7 @@
"Submissions"
],
"summary": "Create a submission from PDF",
- "description": "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 Guides
Use embedded text field tags to create a fillable form\n",
+ "description": "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://sign.wabo.cc/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.
Related Guides
Use embedded text field tags to create a fillable form\n",
"operationId": "createSubmissionFromPdf",
"parameters": [],
"requestBody": {
@@ -4220,7 +4220,7 @@
"completed_redirect_url": "https://example.com/"
},
"role": "First Party",
- "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ "embed_src": "https://sign.wabo.cc/s/pAMimKcyrLjqVt"
}
],
"source": "api",
@@ -4271,7 +4271,7 @@
"Submissions"
],
"summary": "Create a submission from DOCX",
- "description": "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 list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents",
+ "description": "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://sign.wabo.cc/examples/demo_template.docx for the specific text variable syntax, including dynamic content tables and list. You can also use the {{signature}} field syntax to define fillable fields, as in a PDF.
Related Guides
Use dynamic content variables in DOCX to create personalized documents",
"operationId": "createSubmissionFromDocx",
"parameters": [],
"requestBody": {
@@ -5133,7 +5133,7 @@
"completed_redirect_url": "https://example.com/"
},
"role": "First Party",
- "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ "embed_src": "https://sign.wabo.cc/s/pAMimKcyrLjqVt"
}
],
"source": "api",
@@ -5184,7 +5184,7 @@
"Submissions"
],
"summary": "Create a submission from HTML",
- "description": "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 Guides
Create PDF document fillable form with HTML",
+ "description": "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 Guides
Create PDF document fillable form with HTML",
"operationId": "createSubmissionFromHtml",
"parameters": [],
"requestBody": {
@@ -6061,7 +6061,7 @@
"completed_redirect_url": "https://example.com/"
},
"role": "First Party",
- "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ "embed_src": "https://sign.wabo.cc/s/pAMimKcyrLjqVt"
}
],
"source": "api",
@@ -6439,7 +6439,7 @@
"documents": [
{
"name": "sample-document",
- "url": "https://docuseal.com/file/hash/sample-document.pdf"
+ "url": "https://sign.wabo.cc/file/hash/sample-document.pdf"
}
],
"role": "First Party"
@@ -6459,7 +6459,7 @@
"Submitters"
],
"summary": "Update a submitter",
- "description": "The API endpoint allows you to update submitter details, pre-fill or update field values and re-send emails.
Related Guides
Automatically sign documents via API",
+ "description": "The API endpoint allows you to update submitter details, pre-fill or update field values and re-send emails.
Related Guides
Automatically sign documents via API",
"operationId": "updateSubmitter",
"parameters": [
{
@@ -6975,7 +6975,7 @@
],
"documents": [],
"role": "First Party",
- "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ "embed_src": "https://sign.wabo.cc/s/pAMimKcyrLjqVt"
}
}
}
@@ -7401,7 +7401,7 @@
"documents": [
{
"name": "sample-document",
- "url": "https://docuseal.com/file/eyJfcmFpbHMiOnsiIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f9758362acced0f3c86cdffad02800e/sample-document.pdf"
+ "url": "https://sign.wabo.cc/file/eyJfcmFpbHMiOnsiIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f9758362acced0f3c86cdffad02800e/sample-document.pdf"
}
],
"role": "First Party"
@@ -7898,7 +7898,7 @@
{
"id": 3,
"uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5",
- "url": "https://docuseal.com/file/hash/Test%20Template.pdf"
+ "url": "https://sign.wabo.cc/file/hash/Test%20Template.pdf"
}
]
}
@@ -8358,7 +8358,7 @@
{
"id": 9,
"uuid": "ded62277-9705-4fac-b5dc-58325d4102eb",
- "url": "https://docuseal.com/file/hash/sample-document.pdf",
+ "url": "https://sign.wabo.cc/file/hash/sample-document.pdf",
"filename": "sample-document.pdf"
}
]
@@ -8380,7 +8380,7 @@
"Templates"
],
"summary": "Create a template from HTML",
- "description": "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 Guides
Create PDF document fillable form with HTML",
+ "description": "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 Guides
Create PDF document fillable form with HTML",
"operationId": "createTemplateFromHtml",
"parameters": [],
"requestBody": {
@@ -8871,7 +8871,7 @@
{
"id": 3,
"uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5",
- "url": "https://docuseal.com/file/hash/Test%20Template.pdf"
+ "url": "https://sign.wabo.cc/file/hash/Test%20Template.pdf"
}
]
}
@@ -8892,7 +8892,7 @@
"Templates"
],
"summary": "Create a template from Word DOCX",
- "description": "The API endpoint provides the functionality to create a fillable document template for 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 Guides
Use embedded text field tags to create a fillable form\n",
+ "description": "The API endpoint provides the functionality to create a fillable document template for existing Microsoft Word document. Use {{Field Name;role=Signer1;type=date}} text tags to define fillable fields in the document. See https://sign.wabo.cc/examples/fieldtags.docx for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.
Related Guides
Use embedded text field tags to create a fillable form\n",
"operationId": "createTemplateFromDocx",
"parameters": [],
"requestBody": {
@@ -9595,7 +9595,7 @@
{
"id": 7,
"uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf",
- "url": "https://docuseal.com/hash/DemoPDF.pdf"
+ "url": "https://sign.wabo.cc/hash/DemoPDF.pdf"
}
]
}
@@ -9616,7 +9616,7 @@
"Templates"
],
"summary": "Create a template from PDF",
- "description": "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 Guides
Use embedded text field tags to create a fillable form\n",
+ "description": "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://sign.wabo.cc/examples/fieldtags.pdf for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.
Related Guides
Use embedded text field tags to create a fillable form\n",
"operationId": "createTemplateFromPdf",
"parameters": [],
"requestBody": {
@@ -10337,7 +10337,7 @@
{
"id": 7,
"uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf",
- "url": "https://docuseal.com/file/hash/Demo%20PDF.pdf"
+ "url": "https://sign.wabo.cc/file/hash/Demo%20PDF.pdf"
}
]
}
@@ -10816,7 +10816,7 @@
{
"id": 9,
"uuid": "ded62277-9705-4fac-b5dc-58325d4102eb",
- "url": "https://docuseal.com/file/hash/sample-document.pdf",
+ "url": "https://sign.wabo.cc/file/hash/sample-document.pdf",
"filename": "sample-document.pdf"
}
]
diff --git a/docs/webhooks/form-webhook.md b/docs/webhooks/form-webhook.md
index 32c0eb19..430d3349 100644
--- a/docs/webhooks/form-webhook.md
+++ b/docs/webhooks/form-webhook.md
@@ -9,7 +9,7 @@ During the form filling and signing process, 3 types of events may occur and are
It's important to note that each of these events contain information available at the time of dispatch, so some data may be missing or incomplete depending on the specific event. Failed webhook requests (4xx, 5xx) are automatically retried multiple times within 48 hours (every 2^attempt minutes) for all production accounts.
**Related Guides**
-[Download Signed Documents](https://www.docuseal.com/guides/download-signed-documents)
+[Download Signed Documents](https://sign.wabo.cc/guides/download-signed-documents)
```json
{
@@ -130,7 +130,7 @@ During the form filling and signing process, 3 types of events may occur and are
},
"combined_document_url": {
"type": "string",
- "description": "The URL of the combined documents with audit log. Combined documents can be enabled via /settings/accounts."
+ "description": "The URL of the combined documents with audit log. Combined documents can be enabled via /settings/accounts."
},
"status": {
"type": "string",
diff --git a/lib/wabosign.rb b/lib/wabosign.rb
index e6f41d00..7d17c03b 100644
--- a/lib/wabosign.rb
+++ b/lib/wabosign.rb
@@ -3,7 +3,6 @@
module Wabosign
PRODUCT_URL = ENV.fetch('PRODUCT_URL', 'https://sign.wabo.cc')
PRODUCT_EMAIL_URL = ENV.fetch('PRODUCT_EMAIL_URL', PRODUCT_URL)
- ENQUIRIES_URL = "#{PRODUCT_URL}/enquiries".freeze
PRODUCT_NAME = 'WaboSign'
# AGPLv3 §7(b) upstream attribution — must remain visible in interactive UIs.
UPSTREAM_NAME = 'DocuSeal'
@@ -14,25 +13,6 @@ module Wabosign
HOST = ENV.fetch('HOST', 'localhost')
AATL_CERT_NAME = 'wabosign_aatl'
GOOGLE_DEFAULT_ACCOUNT_ID = ENV.fetch('GOOGLE_DEFAULT_ACCOUNT_ID', nil)
- CONSOLE_URL = if Rails.env.development?
- 'http://console.localhost.io:3001'
- elsif ENV['MULTITENANT'] == 'true'
- "https://console.#{HOST}"
- else
- "https://console.#{HOST}"
- end
- CLOUD_URL = if Rails.env.development?
- 'http://localhost:3000'
- else
- PRODUCT_URL
- end
- CDN_URL = if Rails.env.development?
- 'http://localhost:3000'
- elsif ENV['MULTITENANT'] == 'true'
- "https://cdn.#{HOST}"
- else
- "https://cdn.#{HOST}"
- end
CERTS = JSON.parse(ENV.fetch('CERTS', '{}'))
TIMESERVER_URL = ENV.fetch('TIMESERVER_URL', nil)
diff --git a/package.json b/package.json
index 24f3130e..3d5577ee 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,11 @@
{
- "name": "docuseal",
+ "name": "wabosign",
"private": true,
+ "license": "AGPL-3.0-or-later",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/wabolabs/wabosign.git"
+ },
"dependencies": {
"@babel/core": "7.21.8",
"@babel/plugin-transform-runtime": "7.21.4",
diff --git a/spec/system/signing_form_spec.rb b/spec/system/signing_form_spec.rb
index 88884d6d..93d0515a 100644
--- a/spec/system/signing_form_spec.rb
+++ b/spec/system/signing_form_spec.rb
@@ -1091,7 +1091,7 @@ RSpec.describe 'Signing Form' do
expect(page).to have_content('This submission has multiple signers, which prevents the use of a sharing link ' \
"as it's unclear which signer is responsible for specific fields. " \
'To resolve this, follow this guide to define the default signer details.')
- expect(page).to have_link('guide', href: 'https://www.docuseal.com/resources/pre-filling-recipients')
+ expect(page).to have_link('guide', href: 'https://sign.wabo.cc/docs/pre-filling-recipients')
end
it 'shows a "Not found" error message if a logged-out user associated with the template account opens the link' do