diff --git a/docs/api/csharp.md b/docs/api/csharp.md
index b0b68b36..8df5aeb5 100644
--- a/docs/api/csharp.md
+++ b/docs/api/csharp.md
@@ -1573,6 +1573,11 @@ var response = client.Execute(request);
"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.",
@@ -1654,6 +1659,11 @@ var response = client.Execute(request);
"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": {
@@ -2217,6 +2227,11 @@ var response = client.Execute(request);
"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.",
@@ -2236,3 +2251,1191 @@ var response = client.Execute(request);
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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/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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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 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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### 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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/go.md b/docs/api/go.md
index 09d65608..83db964f 100644
--- a/docs/api/go.md
+++ b/docs/api/go.md
@@ -1923,6 +1923,11 @@ func main() {
"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.",
@@ -2027,6 +2032,11 @@ func main() {
"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": {
@@ -2636,6 +2646,11 @@ func main() {
"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.",
@@ -2655,3 +2670,1260 @@ func main() {
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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/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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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 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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### 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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/java.md b/docs/api/java.md
index 5a1adb66..ca3df371 100644
--- a/docs/api/java.md
+++ b/docs/api/java.md
@@ -1557,6 +1557,11 @@ HttpResponse response = Unirest.post("https://api.docuseal.com/templates
"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.",
@@ -1637,6 +1642,11 @@ HttpResponse response = Unirest.post("https://api.docuseal.com/templates
"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": {
@@ -2198,6 +2208,11 @@ HttpResponse response = Unirest.post("https://api.docuseal.com/templates
"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.",
@@ -2217,3 +2232,1188 @@ HttpResponse response = Unirest.post("https://api.docuseal.com/templates
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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/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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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 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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### 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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/javascript.md b/docs/api/javascript.md
index ab7b5518..0fea7231 100644
--- a/docs/api/javascript.md
+++ b/docs/api/javascript.md
@@ -1617,6 +1617,11 @@ and typesetting industry
"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.",
@@ -1705,6 +1710,11 @@ const template = await docuseal.createTemplateFromDocx({
"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": {
@@ -2294,6 +2304,11 @@ const template = await docuseal.mergeTemplates({
"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.",
@@ -2313,3 +2328,1260 @@ const template = await docuseal.mergeTemplates({
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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 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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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 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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### 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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/nodejs.md b/docs/api/nodejs.md
index 5e052f72..3b099a3a 100644
--- a/docs/api/nodejs.md
+++ b/docs/api/nodejs.md
@@ -1704,6 +1704,11 @@ const template = await resp.json();
"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.",
@@ -1798,6 +1803,11 @@ const template = await resp.json();
"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": {
@@ -2399,6 +2409,11 @@ const template = await resp.json();
"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.",
@@ -2418,3 +2433,1278 @@ const template = await resp.json();
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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/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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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 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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### 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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/php.md b/docs/api/php.md
index e6911f02..ff02eb85 100644
--- a/docs/api/php.md
+++ b/docs/api/php.md
@@ -1585,6 +1585,11 @@ and typesetting industry
"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.",
@@ -1671,6 +1676,11 @@ $docuseal->createTemplateFromDocx([
"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": {
@@ -2256,6 +2266,11 @@ $docuseal->mergeTemplates([
"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.",
@@ -2275,3 +2290,1254 @@ $docuseal->mergeTemplates([
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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->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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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 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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### 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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/python.md b/docs/api/python.md
index f0060e3f..50edcd4e 100644
--- a/docs/api/python.md
+++ b/docs/api/python.md
@@ -1633,6 +1633,11 @@ and typesetting industry
"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.",
@@ -1722,6 +1727,11 @@ docuseal.create_template_from_docx({
"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": {
@@ -2313,6 +2323,11 @@ docuseal.merge_templates({
"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.",
@@ -2332,3 +2347,1263 @@ docuseal.merge_templates({
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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_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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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 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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### 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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/ruby.md b/docs/api/ruby.md
index e0f21818..cf2cd9fe 100644
--- a/docs/api/ruby.md
+++ b/docs/api/ruby.md
@@ -1633,6 +1633,11 @@ and typesetting industry
"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.",
@@ -1722,6 +1727,11 @@ Docuseal.create_template_from_docx({
"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": {
@@ -2313,6 +2323,11 @@ Docuseal.merge_templates({
"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.",
@@ -2332,3 +2347,1263 @@ Docuseal.merge_templates({
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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_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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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 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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### 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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/shell.md b/docs/api/shell.md
index ec286be1..02016519 100644
--- a/docs/api/shell.md
+++ b/docs/api/shell.md
@@ -1557,6 +1557,11 @@ curl --request POST \
"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.",
@@ -1637,6 +1642,11 @@ curl --request POST \
"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": {
@@ -2198,6 +2208,11 @@ curl --request POST \
"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.",
@@ -2217,3 +2232,1188 @@ curl --request POST \
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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/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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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 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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### 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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/api/typescript.md b/docs/api/typescript.md
index 9ee334ce..d2bd2a7e 100644
--- a/docs/api/typescript.md
+++ b/docs/api/typescript.md
@@ -1617,6 +1617,11 @@ and typesetting industry
"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.",
@@ -1705,6 +1710,11 @@ const template = await docuseal.createTemplateFromDocx({
"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": {
@@ -2294,6 +2304,11 @@ const template = await docuseal.mergeTemplates({
"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.",
@@ -2313,3 +2328,1260 @@ const template = await docuseal.mergeTemplates({
}
```
+### Create a submission from PDF
+
+The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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 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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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 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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
+### 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"
+ ]
+ },
+ "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"
+ ]
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ }
+}
+```
+
diff --git a/docs/embedding/form-builder-angular.md b/docs/embedding/form-builder-angular.md
index 61346f60..89eb9c65 100644
--- a/docs/embedding/form-builder-angular.md
+++ b/docs/embedding/form-builder-angular.md
@@ -132,7 +132,27 @@ const token = jwt.sign({
"fieldTypes": {
"type": "array",
"required": false,
- "description": "Field type names to be used in the form builder. All field types are used by default."
+ "description": "Field type names to be used in the form builder. All field types are used by default.",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "datenow",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
},
"drawFieldType": {
"type": "string",
diff --git a/docs/embedding/form-builder-javascript.md b/docs/embedding/form-builder-javascript.md
index ecd795b1..64cb8eaf 100644
--- a/docs/embedding/form-builder-javascript.md
+++ b/docs/embedding/form-builder-javascript.md
@@ -317,7 +317,27 @@
"type": "string",
"required": false,
"description": "Comma separated field type names to be used in the form builder. All field types are used by default.",
- "example": "text,date"
+ "example": "text,date",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "datenow",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
},
"data-draw-field-type": {
"type": "string",
diff --git a/docs/embedding/form-builder-react.md b/docs/embedding/form-builder-react.md
index 21bf8efc..e38a146a 100644
--- a/docs/embedding/form-builder-react.md
+++ b/docs/embedding/form-builder-react.md
@@ -123,7 +123,27 @@ const token = jwt.sign({
"fieldTypes": {
"type": "array",
"required": false,
- "description": "Field type names to be used in the form builder. All field types are used by default."
+ "description": "Field type names to be used in the form builder. All field types are used by default.",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "datenow",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
},
"drawFieldType": {
"type": "string",
diff --git a/docs/embedding/form-builder-vue.md b/docs/embedding/form-builder-vue.md
index a7194c4e..698360aa 100644
--- a/docs/embedding/form-builder-vue.md
+++ b/docs/embedding/form-builder-vue.md
@@ -144,7 +144,27 @@ const token = jwt.sign({
"field-types": {
"type": "array",
"required": false,
- "description": "Field type names to be used in the form builder. All field types are used by default."
+ "description": "Field type names to be used in the form builder. All field types are used by default.",
+ "enum": [
+ "heading",
+ "text",
+ "signature",
+ "initials",
+ "date",
+ "datenow",
+ "number",
+ "image",
+ "checkbox",
+ "multiple",
+ "file",
+ "radio",
+ "select",
+ "cells",
+ "stamp",
+ "payment",
+ "phone",
+ "verification"
+ ]
},
"draw-field-type": {
"type": "string",
diff --git a/docs/embedding/signing-form-angular.md b/docs/embedding/signing-form-angular.md
index 63a5a434..8bbad1a0 100644
--- a/docs/embedding/signing-form-angular.md
+++ b/docs/embedding/signing-form-angular.md
@@ -48,6 +48,41 @@ export class AppComponent {}
"description": "The role name or title of the signer.",
"example": "First Party"
},
+ "token": {
+ "type": "string",
+ "doc_type": "object",
+ "description": "JSON Web Token (JWT HS256) with a payload signed using the API key. JWT can be generated only on the backend..",
+ "required": false,
+ "properties": {
+ "slug": {
+ "type": "string",
+ "required": true,
+ "description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
+ },
+ "email": {
+ "type": "string",
+ "required": false,
+ "description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
+ },
+ "external_id": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it."
+ }
+ }
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `data-token` authentication."
+ },
"expand": {
"type": "boolean",
"required": false,
@@ -66,11 +101,6 @@ export class AppComponent {}
"default": false,
"description": "Order form fields based on their position on the pages."
},
- "externalId": {
- "type": "string",
- "required": false,
- "description": "Your application-specific unique string key to identify signer within your app."
- },
"logo": {
"type": "string",
"required": false,
@@ -87,12 +117,6 @@ export class AppComponent {}
"default": "{}",
"description": "Object that contains i18n keys to replace the default UI text with custom values. See submission_form/i18n.js for available i18n keys."
},
- "preview": {
- "type": "boolean",
- "required": false,
- "default": false,
- "description": "Show form in preview mode without ability to submit it."
- },
"goToLast": {
"type": "boolean",
"required": false,
@@ -242,6 +266,11 @@ export class AppComponent {}
"description": "Pre-assigned values for form fields.",
"example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }"
},
+ "externalId": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
"metadata": {
"type": "object",
"required": false,
diff --git a/docs/embedding/signing-form-javascript.md b/docs/embedding/signing-form-javascript.md
index 05d375aa..9674bb35 100644
--- a/docs/embedding/signing-form-javascript.md
+++ b/docs/embedding/signing-form-javascript.md
@@ -42,6 +42,41 @@
"description": "The role name or title of the signer.",
"example": "First Party"
},
+ "data-token": {
+ "type": "string",
+ "doc_type": "object",
+ "description": "JSON Web Token (JWT HS256) with a payload signed using the API key. JWT can be generated only on the backend..",
+ "required": false,
+ "properties": {
+ "slug": {
+ "type": "string",
+ "required": true,
+ "description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
+ },
+ "email": {
+ "type": "string",
+ "required": false,
+ "description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
+ },
+ "external_id": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it."
+ }
+ }
+ },
+ "data-preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `data-token` authentication."
+ },
"data-expand": {
"type": "boolean",
"required": false,
@@ -60,12 +95,6 @@
"default": false,
"description": "Order form fields based on their position on the pages."
},
- "data-preview": {
- "type": "boolean",
- "required": false,
- "default": false,
- "description": "Show form in preview mode without ability to submit it."
- },
"data-logo": {
"type": "string",
"required": false,
diff --git a/docs/embedding/signing-form-react.md b/docs/embedding/signing-form-react.md
index 8c0c1f9b..91039bbf 100644
--- a/docs/embedding/signing-form-react.md
+++ b/docs/embedding/signing-form-react.md
@@ -45,6 +45,41 @@ export function App() {
"description": "The role name or title of the signer.",
"example": "First Party"
},
+ "token": {
+ "type": "string",
+ "doc_type": "object",
+ "description": "JSON Web Token (JWT HS256) with a payload signed using the API key. JWT can be generated only on the backend..",
+ "required": false,
+ "properties": {
+ "slug": {
+ "type": "string",
+ "required": true,
+ "description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
+ },
+ "email": {
+ "type": "string",
+ "required": false,
+ "description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
+ },
+ "external_id": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it."
+ }
+ }
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `token` authentication."
+ },
"expand": {
"type": "boolean",
"required": false,
@@ -63,11 +98,6 @@ export function App() {
"default": false,
"description": "Order form fields based on their position on the pages."
},
- "externalId": {
- "type": "string",
- "required": false,
- "description": "Your application-specific unique string key to identify signer within your app."
- },
"logo": {
"type": "string",
"required": false,
@@ -84,12 +114,6 @@ export function App() {
"default": "{}",
"description": "Object that contains i18n keys to replace the default UI text with custom values. See submission_form/i18n.js for available i18n keys."
},
- "preview": {
- "type": "boolean",
- "required": false,
- "default": false,
- "description": "Show form in preview mode without ability to submit it."
- },
"goToLast": {
"type": "boolean",
"required": false,
@@ -239,6 +263,11 @@ export function App() {
"description": "Pre-assigned values for form fields.",
"example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }"
},
+ "externalId": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
"metadata": {
"type": "object",
"required": false,
diff --git a/docs/embedding/signing-form-vue.md b/docs/embedding/signing-form-vue.md
index afe1c597..45e6a336 100644
--- a/docs/embedding/signing-form-vue.md
+++ b/docs/embedding/signing-form-vue.md
@@ -54,10 +54,40 @@ export default {
"description": "The role name or title of the signer.",
"example": "First Party"
},
- "external-id": {
+ "token": {
"type": "string",
+ "doc_type": "object",
+ "description": "JSON Web Token (JWT HS256) with a payload signed using the API key. JWT can be generated only on the backend..",
"required": false,
- "description": "Your application-specific unique string key to identify signer within your app."
+ "properties": {
+ "slug": {
+ "type": "string",
+ "required": true,
+ "description": "Template or Submitter slug. When Submitter slug is used no need to pass additional email param."
+ },
+ "email": {
+ "type": "string",
+ "required": false,
+ "description": "Email address of the signer. Additional email form step will be displayed if the email attribute is not specified with Template slug."
+ },
+ "external_id": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it."
+ }
+ }
+ },
+ "preview": {
+ "type": "boolean",
+ "required": false,
+ "default": false,
+ "description": "Show form in preview mode without ability to submit it. Completed documents embedded in preview mode require `data-token` authentication."
},
"expand": {
"type": "boolean",
@@ -93,12 +123,6 @@ export default {
"default": "{}",
"description": "Object that contains i18n keys to replace the default UI text with custom values. See submission_form/i18n.js for available i18n keys."
},
- "preview": {
- "type": "boolean",
- "required": false,
- "default": false,
- "description": "Show form in preview mode without ability to submit it."
- },
"go-to-last": {
"type": "boolean",
"required": false,
@@ -249,6 +273,11 @@ export default {
"description": "Pre-assigned values for form fields.",
"example": "{ 'First Name': 'Jon', 'Last Name': 'Doe' }"
},
+ "external-id": {
+ "type": "string",
+ "required": false,
+ "description": "Your application-specific unique string key to identify signer within your app."
+ },
"metadata": {
"type": "object",
"required": false,
diff --git a/docs/openapi.json b/docs/openapi.json
index 93f4dabf..e1960410 100644
--- a/docs/openapi.json
+++ b/docs/openapi.json
@@ -406,6 +406,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -545,6 +549,7 @@
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -864,6 +869,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -974,6 +983,7 @@
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -1274,7 +1284,6 @@
"created_at",
"updated_at",
"submitters",
- "template",
"created_by_user"
],
"properties": {
@@ -1282,6 +1291,11 @@
"type": "integer",
"description": "Submission unique ID number."
},
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
"source": {
"type": "string",
"description": "The source of the submission.",
@@ -1557,6 +1571,7 @@
"data": [
{
"id": 1,
+ "name": null,
"source": "link",
"submitters_order": "random",
"slug": "VyL4szTwYoSvXq",
@@ -2216,7 +2231,6 @@
"updated_at",
"archived_at",
"submitters",
- "template",
"created_by_user",
"submission_events",
"documents",
@@ -2229,6 +2243,11 @@
"type": "integer",
"description": "Submission unique ID number."
},
+ "name": {
+ "type": "string",
+ "description": "Name of the document submission",
+ "example": "Test Submission Document"
+ },
"slug": {
"type": "string",
"description": "Unique slug of the submission."
@@ -2611,6 +2630,7 @@
},
"example": {
"id": 1,
+ "name": null,
"source": "link",
"submitters_order": "random",
"slug": "VyL4szTwYoSvXq",
@@ -2965,170 +2985,1908 @@
{
"type": "string"
},
- {
- "type": "number"
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "string"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "boolean"
+ }
+ ]
+ }
+ }
+ ],
+ "description": "Pre-filled value of the field."
+ }
+ }
+ }
+ },
+ "metadata": {
+ "type": "object"
+ },
+ "sent_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the signing request was sent to the submitter."
+ },
+ "opened_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter opened the signing form."
+ },
+ "completed_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter completed the signing form."
+ },
+ "declined_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter declined the signing form."
+ },
+ "created_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was last updated."
+ },
+ "name": {
+ "type": "string",
+ "nullable": true,
+ "description": "The name of the submitter."
+ },
+ "phone": {
+ "type": "string",
+ "nullable": true,
+ "description": "The phone number of the submitter."
+ },
+ "external_id": {
+ "type": "string",
+ "nullable": true,
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "send_email": {
+ "type": "boolean",
+ "description": "Indicates whether the signature request email should be sent."
+ },
+ "send_sms": {
+ "type": "boolean",
+ "description": "Indicates whether the signature request should be sent via SMS."
+ }
+ }
+ },
+ "role": {
+ "type": "string",
+ "description": "The role of the submitter in the signing process."
+ },
+ "embed_src": {
+ "type": "string",
+ "description": "The `src` URL value to embed the signing form or sign via a link."
+ }
+ }
+ }
+ },
+ "example": [
+ {
+ "id": 1,
+ "submission_id": 1,
+ "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
+ "email": "john.doe@example.com",
+ "slug": "pAMimKcyrLjqVt",
+ "sent_at": "2023-12-13T23:04:04.252Z",
+ "opened_at": null,
+ "completed_at": null,
+ "declined_at": null,
+ "created_at": "2023-12-14T15:50:21.799Z",
+ "updated_at": "2023-12-14T15:50:21.799Z",
+ "name": "string",
+ "phone": "+1234567890",
+ "external_id": "2321",
+ "metadata": {
+ "customData": "custom value"
+ },
+ "status": "sent",
+ "values": [
+ {
+ "field": "Full Name",
+ "value": "John Doe"
+ }
+ ],
+ "preferences": {
+ "send_email": true,
+ "send_sms": false
+ },
+ "role": "First Party",
+ "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ },
+ {
+ "id": 2,
+ "submission_id": 1,
+ "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
+ "email": "alan.smith@example.com",
+ "slug": "SEwc65vHNDH3QS",
+ "sent_at": "2023-12-13T23:04:04.252Z",
+ "opened_at": null,
+ "completed_at": null,
+ "declined_at": null,
+ "created_at": "2023-12-14T15:50:21.799Z",
+ "updated_at": "2023-12-14T15:50:21.799Z",
+ "name": "string",
+ "phone": "+1234567890",
+ "external_id": "2321",
+ "metadata": {
+ "customData": "custom value"
+ },
+ "status": "sent",
+ "values": [
+ {
+ "field": "Full Name",
+ "value": "Roe Moe"
+ }
+ ],
+ "preferences": {
+ "send_email": true,
+ "send_sms": false
+ },
+ "role": "First Party",
+ "embed_src": "SEwc65vHNDH3QS"
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ },
+ "/submissions/pdf": {
+ "post": {
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "Submissions"
+ ],
+ "summary": "Create a submission from PDF",
+ "description": "The API endpoint provides the functionality to create one-off submission request from a PDF or DOCX 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",
+ "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 or DOCX 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"
+ ]
+ },
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "id",
+ "submitters",
+ "source",
+ "submitters_order",
+ "status",
+ "documents",
+ "expire_at",
+ "created_at"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Submission unique ID number."
+ },
+ "name": {
+ "type": "string",
+ "description": "Submission name."
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters.",
+ "items": {
+ "type": "object",
+ "required": [
+ "id",
+ "submission_id",
+ "uuid",
+ "email",
+ "slug",
+ "sent_at",
+ "opened_at",
+ "completed_at",
+ "declined_at",
+ "created_at",
+ "updated_at",
+ "name",
+ "phone",
+ "status",
+ "role",
+ "metadata",
+ "preferences"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Submission unique ID number."
+ },
+ "uuid": {
+ "type": "string",
+ "description": "Submitter UUID."
+ },
+ "email": {
+ "type": "string",
+ "nullable": true,
+ "description": "The email address of the submitter."
+ },
+ "slug": {
+ "type": "string",
+ "description": "Unique key to be used in the form signing link and embedded form."
+ },
+ "sent_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the signing request was sent to the submitter."
+ },
+ "opened_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter opened the signing form."
+ },
+ "completed_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter completed the signing form."
+ },
+ "declined_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter declined to complete the signing form."
+ },
+ "created_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was last updated."
+ },
+ "name": {
+ "type": "string",
+ "nullable": true,
+ "description": "Submitter name."
+ },
+ "phone": {
+ "type": "string",
+ "nullable": true,
+ "description": "Submitter phone number."
+ },
+ "external_id": {
+ "type": "string",
+ "nullable": true,
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "status": {
+ "type": "string",
+ "description": "The status of signing request for the submitter.",
+ "enum": [
+ "completed",
+ "declined",
+ "opened",
+ "sent",
+ "awaiting"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "The role of the submitter."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information."
+ },
+ "preferences": {
+ "type": "object",
+ "description": "Object with submitter preferences."
+ },
+ "embed_src": {
+ "type": "string",
+ "description": "The `src` URL value to embed the signing form or sign via a link."
+ }
+ }
+ }
+ },
+ "source": {
+ "type": "string",
+ "description": "The source of the submission.",
+ "enum": [
+ "invite",
+ "bulk",
+ "api",
+ "embed",
+ "link"
+ ]
+ },
+ "submitters_order": {
+ "type": "string",
+ "description": "The order of submitters.",
+ "enum": [
+ "random",
+ "preserved"
+ ]
+ },
+ "status": {
+ "type": "string",
+ "description": "The status of the submission.",
+ "enum": [
+ "completed",
+ "declined",
+ "expired",
+ "pending"
+ ]
+ },
+ "schema": {
+ "type": "array",
+ "description": "The one-off submission document files.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "attachment_uuid": {
+ "type": "string",
+ "description": "The attachment UUID."
+ },
+ "name": {
+ "type": "string",
+ "description": "The attachment name."
+ }
+ }
+ }
+ },
+ "fields": {
+ "type": "array",
+ "description": "List of fields to be filled in the one-off submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "uuid",
+ "submitter_uuid",
+ "name",
+ "type",
+ "required",
+ "areas"
+ ],
+ "properties": {
+ "uuid": {
+ "type": "string",
+ "description": "Unique identifier of the field."
+ },
+ "submitter_uuid": {
+ "type": "string",
+ "description": "Unique identifier of the submitter that filled the field."
+ },
+ "name": {
+ "type": "string",
+ "description": "Field name."
+ },
+ "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"
+ ]
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels."
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value."
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value."
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value."
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value."
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value."
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types."
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields."
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields."
+ },
+ "mask": {
+ "type": "boolean",
+ "description": "Indicates if the field is masked on the document."
+ }
+ }
+ },
+ "areas": {
+ "type": "array",
+ "description": "List of areas where the field is located in the document.",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "attachment_uuid",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X coordinate of the area where the field is located in the document."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y coordinate of the area where the field is located in the document."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the area where the field is located in the document."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the area where the field is located in the document."
+ },
+ "attachment_uuid": {
+ "type": "string",
+ "description": "Unique identifier of the attached document where the field is located."
+ },
+ "page": {
+ "type": "integer",
+ "description": "Page number of the attached document where the field is located."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "List of documents attached to the one-off submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "attachment_uuid",
+ "name"
+ ],
+ "properties": {
+ "attachment_uuid": {
+ "type": "string",
+ "description": "Unique indentifier of attached document to the one-off submission."
+ },
+ "name": {
+ "type": "string",
+ "description": "Name of the attached document to the one-off submission."
+ }
+ }
+ }
+ },
+ "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"
+ },
+ "created_at": {
+ "type": "string",
+ "description": "The date and time when the submission was created."
+ }
+ }
+ },
+ "example": {
+ "id": 5,
+ "name": "Test Submission",
+ "submitters": [
+ {
+ "id": 1,
+ "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
+ "email": "john.doe@example.com",
+ "slug": "pAMimKcyrLjqVt",
+ "sent_at": "2025-06-02T15:55:51.310Z",
+ "opened_at": null,
+ "completed_at": null,
+ "declined_at": null,
+ "created_at": "2025-06-02T15:55:50.320Z",
+ "updated_at": "2025-06-02T15:55:50.320Z",
+ "name": "string",
+ "phone": "+1234567890",
+ "external_id": "2321",
+ "metadata": {
+ "customData": "custom value"
+ },
+ "status": "sent",
+ "values": [
+ {
+ "field": "Full Name",
+ "value": "John Doe"
+ }
+ ],
+ "preferences": {
+ "send_email": true,
+ "send_sms": false,
+ "reply_to": "reply@example.com",
+ "completed_redirect_url": "https://example.com/"
+ },
+ "role": "First Party",
+ "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ }
+ ],
+ "source": "api",
+ "submitters_order": "preserved",
+ "status": "pending",
+ "schema": [
+ {
+ "name": "Demo PDF",
+ "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf"
+ }
+ ],
+ "fields": [
+ {
+ "name": "Name",
+ "type": "text",
+ "required": true,
+ "uuid": "d0bf3c0c-1928-40c8-80f9-d9f3c6ad4eff",
+ "submitter_uuid": "0b0bff58-bc9a-475d-b4a9-2f3e5323faf7",
+ "areas": [
+ {
+ "page": 1,
+ "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf",
+ "x": 0.403158189124654,
+ "y": 0.04211750189825361,
+ "w": 0.100684625476058,
+ "h": 0.01423690205011389
+ }
+ ]
+ }
+ ],
+ "expire_at": null,
+ "created_at": "2025-06-02T15:55:50.270Z"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/submissions/html": {
+ "post": {
+ "security": [
+ {
+ "AuthToken": []
+ }
+ ],
+ "tags": [
+ "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",
+ "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."
+ },
+ "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_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}"
+ },
+ "invalid_message": {
+ "type": "string",
+ "description": "A custom message to display on pattern validation failure."
+ },
+ "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"
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "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
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "OK",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "id",
+ "submitters",
+ "source",
+ "submitters_order",
+ "status",
+ "documents",
+ "expire_at",
+ "created_at"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Submission unique ID number."
+ },
+ "name": {
+ "type": "string",
+ "description": "Submission name."
+ },
+ "submitters": {
+ "type": "array",
+ "description": "The list of submitters.",
+ "items": {
+ "type": "object",
+ "required": [
+ "id",
+ "submission_id",
+ "uuid",
+ "email",
+ "slug",
+ "sent_at",
+ "opened_at",
+ "completed_at",
+ "declined_at",
+ "created_at",
+ "updated_at",
+ "name",
+ "phone",
+ "status",
+ "role",
+ "metadata",
+ "preferences"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Submission unique ID number."
+ },
+ "uuid": {
+ "type": "string",
+ "description": "Submitter UUID."
+ },
+ "email": {
+ "type": "string",
+ "nullable": true,
+ "description": "The email address of the submitter."
+ },
+ "slug": {
+ "type": "string",
+ "description": "Unique key to be used in the form signing link and embedded form."
+ },
+ "sent_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the signing request was sent to the submitter."
+ },
+ "opened_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter opened the signing form."
+ },
+ "completed_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter completed the signing form."
+ },
+ "declined_at": {
+ "type": "string",
+ "nullable": true,
+ "description": "The date and time when the submitter declined to complete the signing form."
+ },
+ "created_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was created."
+ },
+ "updated_at": {
+ "type": "string",
+ "description": "The date and time when the submitter was last updated."
+ },
+ "name": {
+ "type": "string",
+ "nullable": true,
+ "description": "Submitter name."
+ },
+ "phone": {
+ "type": "string",
+ "nullable": true,
+ "description": "Submitter phone number."
+ },
+ "external_id": {
+ "type": "string",
+ "nullable": true,
+ "description": "Your application-specific unique string key to identify this submitter within your app."
+ },
+ "status": {
+ "type": "string",
+ "description": "The status of signing request for the submitter.",
+ "enum": [
+ "completed",
+ "declined",
+ "opened",
+ "sent",
+ "awaiting"
+ ]
+ },
+ "role": {
+ "type": "string",
+ "description": "The role of the submitter."
+ },
+ "metadata": {
+ "type": "object",
+ "description": "Metadata object with additional submitter information."
+ },
+ "preferences": {
+ "type": "object",
+ "description": "Object with submitter preferences."
+ },
+ "embed_src": {
+ "type": "string",
+ "description": "The `src` URL value to embed the signing form or sign via a link."
+ }
+ }
+ }
+ },
+ "source": {
+ "type": "string",
+ "description": "The source of the submission.",
+ "enum": [
+ "invite",
+ "bulk",
+ "api",
+ "embed",
+ "link"
+ ]
+ },
+ "submitters_order": {
+ "type": "string",
+ "description": "The order of submitters.",
+ "enum": [
+ "random",
+ "preserved"
+ ]
+ },
+ "status": {
+ "type": "string",
+ "description": "The status of the submission.",
+ "enum": [
+ "completed",
+ "declined",
+ "expired",
+ "pending"
+ ]
+ },
+ "schema": {
+ "type": "array",
+ "description": "The one-off submission document files.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "attachment_uuid": {
+ "type": "string",
+ "description": "The attachment UUID."
+ },
+ "name": {
+ "type": "string",
+ "description": "The attachment name."
+ }
+ }
+ }
+ },
+ "fields": {
+ "type": "array",
+ "description": "List of fields to be filled in the one-off submission.",
+ "items": {
+ "type": "object",
+ "required": [
+ "uuid",
+ "submitter_uuid",
+ "name",
+ "type",
+ "required",
+ "areas"
+ ],
+ "properties": {
+ "uuid": {
+ "type": "string",
+ "description": "Unique identifier of the field."
+ },
+ "submitter_uuid": {
+ "type": "string",
+ "description": "Unique identifier of the submitter that filled the field."
+ },
+ "name": {
+ "type": "string",
+ "description": "Field name."
+ },
+ "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"
+ ]
+ },
+ "required": {
+ "type": "boolean",
+ "description": "Indicates if the field is required."
+ },
+ "preferences": {
+ "type": "object",
+ "properties": {
+ "font_size": {
+ "type": "integer",
+ "description": "Font size of the field value in pixels."
+ },
+ "font_type": {
+ "type": "string",
+ "description": "Font type of the field value."
+ },
+ "font": {
+ "type": "string",
+ "description": "Font family of the field value."
+ },
+ "color": {
+ "type": "string",
+ "description": "Font color of the field value."
+ },
+ "align": {
+ "type": "string",
+ "description": "Horizontal alignment of the field text value."
+ },
+ "valign": {
+ "type": "string",
+ "description": "Vertical alignment of the field text value."
+ },
+ "format": {
+ "type": "string",
+ "description": "The data format for different field types."
+ },
+ "price": {
+ "type": "number",
+ "description": "Price value of the payment field. Only for payment fields."
+ },
+ "currency": {
+ "type": "string",
+ "description": "Currency value of the payment field. Only for payment fields."
+ },
+ "mask": {
+ "type": "boolean",
+ "description": "Indicates if the field is masked on the document."
+ }
+ }
+ },
+ "areas": {
+ "type": "array",
+ "description": "List of areas where the field is located in the document.",
+ "items": {
+ "type": "object",
+ "required": [
+ "x",
+ "y",
+ "w",
+ "h",
+ "attachment_uuid",
+ "page"
+ ],
+ "properties": {
+ "x": {
+ "type": "number",
+ "description": "X coordinate of the area where the field is located in the document."
+ },
+ "y": {
+ "type": "number",
+ "description": "Y coordinate of the area where the field is located in the document."
+ },
+ "w": {
+ "type": "number",
+ "description": "Width of the area where the field is located in the document."
+ },
+ "h": {
+ "type": "number",
+ "description": "Height of the area where the field is located in the document."
},
- {
- "type": "boolean"
+ "attachment_uuid": {
+ "type": "string",
+ "description": "Unique identifier of the attached document where the field is located."
},
- {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "string"
- },
- {
- "type": "number"
- },
- {
- "type": "boolean"
- }
- ]
- }
+ "page": {
+ "type": "integer",
+ "description": "Page number of the attached document where the field is located."
}
- ],
- "description": "Pre-filled value of the field."
+ }
}
}
}
- },
- "metadata": {
- "type": "object"
- },
- "sent_at": {
- "type": "string",
- "nullable": true,
- "description": "The date and time when the signing request was sent to the submitter."
- },
- "opened_at": {
- "type": "string",
- "nullable": true,
- "description": "The date and time when the submitter opened the signing form."
- },
- "completed_at": {
- "type": "string",
- "nullable": true,
- "description": "The date and time when the submitter completed the signing form."
- },
- "declined_at": {
- "type": "string",
- "nullable": true,
- "description": "The date and time when the submitter declined the signing form."
- },
- "created_at": {
- "type": "string",
- "description": "The date and time when the submitter was created."
- },
- "updated_at": {
- "type": "string",
- "description": "The date and time when the submitter was last updated."
- },
- "name": {
- "type": "string",
- "nullable": true,
- "description": "The name of the submitter."
- },
- "phone": {
- "type": "string",
- "nullable": true,
- "description": "The phone number of the submitter."
- },
- "external_id": {
- "type": "string",
- "nullable": true,
- "description": "Your application-specific unique string key to identify this submitter within your app."
- },
- "preferences": {
+ }
+ },
+ "documents": {
+ "type": "array",
+ "description": "List of documents attached to the one-off submission.",
+ "items": {
"type": "object",
+ "required": [
+ "attachment_uuid",
+ "name"
+ ],
"properties": {
- "send_email": {
- "type": "boolean",
- "description": "Indicates whether the signature request email should be sent."
+ "attachment_uuid": {
+ "type": "string",
+ "description": "Unique indentifier of attached document to the one-off submission."
},
- "send_sms": {
- "type": "boolean",
- "description": "Indicates whether the signature request should be sent via SMS."
+ "name": {
+ "type": "string",
+ "description": "Name of the attached document to the one-off submission."
}
}
- },
- "role": {
- "type": "string",
- "description": "The role of the submitter in the signing process."
- },
- "embed_src": {
- "type": "string",
- "description": "The `src` URL value to embed the signing form or sign via a link."
- }
- }
- }
- },
- "example": [
- {
- "id": 1,
- "submission_id": 1,
- "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
- "email": "john.doe@example.com",
- "slug": "pAMimKcyrLjqVt",
- "sent_at": "2023-12-13T23:04:04.252Z",
- "opened_at": null,
- "completed_at": null,
- "declined_at": null,
- "created_at": "2023-12-14T15:50:21.799Z",
- "updated_at": "2023-12-14T15:50:21.799Z",
- "name": "string",
- "phone": "+1234567890",
- "external_id": "2321",
- "metadata": {
- "customData": "custom value"
- },
- "status": "sent",
- "values": [
- {
- "field": "Full Name",
- "value": "John Doe"
}
- ],
- "preferences": {
- "send_email": true,
- "send_sms": false
- },
- "role": "First Party",
- "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
- },
- {
- "id": 2,
- "submission_id": 1,
- "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
- "email": "alan.smith@example.com",
- "slug": "SEwc65vHNDH3QS",
- "sent_at": "2023-12-13T23:04:04.252Z",
- "opened_at": null,
- "completed_at": null,
- "declined_at": null,
- "created_at": "2023-12-14T15:50:21.799Z",
- "updated_at": "2023-12-14T15:50:21.799Z",
- "name": "string",
- "phone": "+1234567890",
- "external_id": "2321",
- "metadata": {
- "customData": "custom value"
},
- "status": "sent",
- "values": [
- {
- "field": "Full Name",
- "value": "Roe Moe"
- }
- ],
- "preferences": {
- "send_email": true,
- "send_sms": false
+ "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"
},
- "role": "First Party",
- "embed_src": "SEwc65vHNDH3QS"
+ "created_at": {
+ "type": "string",
+ "description": "The date and time when the submission was created."
+ }
}
- ]
+ },
+ "example": {
+ "id": 5,
+ "name": "Test Submission",
+ "submitters": [
+ {
+ "id": 1,
+ "uuid": "884d545b-3396-49f1-8c07-05b8b2a78755",
+ "email": "john.doe@example.com",
+ "slug": "pAMimKcyrLjqVt",
+ "sent_at": "2025-06-02T15:55:51.310Z",
+ "opened_at": null,
+ "completed_at": null,
+ "declined_at": null,
+ "created_at": "2025-06-02T15:55:50.320Z",
+ "updated_at": "2025-06-02T15:55:50.320Z",
+ "name": "string",
+ "phone": "+1234567890",
+ "external_id": "2321",
+ "metadata": {
+ "customData": "custom value"
+ },
+ "status": "sent",
+ "values": [
+ {
+ "field": "Full Name",
+ "value": "John Doe"
+ }
+ ],
+ "preferences": {
+ "send_email": true,
+ "send_sms": false,
+ "reply_to": "reply@example.com",
+ "completed_redirect_url": "https://example.com/"
+ },
+ "role": "First Party",
+ "embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
+ }
+ ],
+ "source": "api",
+ "submitters_order": "preserved",
+ "status": "pending",
+ "schema": [
+ {
+ "name": "Demo PDF",
+ "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf"
+ }
+ ],
+ "fields": [
+ {
+ "name": "Name",
+ "type": "text",
+ "required": true,
+ "uuid": "d0bf3c0c-1928-40c8-80f9-d9f3c6ad4eff",
+ "submitter_uuid": "0b0bff58-bc9a-475d-b4a9-2f3e5323faf7",
+ "areas": [
+ {
+ "page": 1,
+ "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf",
+ "x": 0.403158189124654,
+ "y": 0.04211750189825361,
+ "w": 0.100684625476058,
+ "h": 0.01423690205011389
+ }
+ ]
+ }
+ ],
+ "expire_at": null,
+ "created_at": "2025-06-02T15:55:50.270Z"
+ }
}
}
}
@@ -4736,6 +6494,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -5179,6 +6941,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -5287,6 +7053,7 @@
"folder_id": 2,
"folder_name": "Default",
"external_id": null,
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -5378,6 +7145,11 @@
"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.",
@@ -5670,6 +7442,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -5778,6 +7554,7 @@
"folder_id": 1,
"folder_name": "Default",
"external_id": "f0b4714f-e44b-4993-905b-68b4451eef8c",
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -5836,6 +7613,11 @@
"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": {
@@ -6315,6 +8097,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -6423,6 +8209,7 @@
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -6453,8 +8240,8 @@
"tags": [
"Templates"
],
- "summary": "Create a template from existing PDF",
- "description": "The API endpoint provides the functionality to create a fillable document template for existing 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",
+ "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",
"operationId": "createTemplateFromPdf",
"parameters": [],
"requestBody": {
@@ -6481,6 +8268,11 @@
"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": {
@@ -6694,19 +8486,19 @@
}
}
}
- },
- "flatten": {
- "type": "boolean",
- "description": "Remove PDF form fields from the document.",
- "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
}
}
}
+ },
+ "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
}
}
}
@@ -6978,6 +8770,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -7086,6 +8882,7 @@
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",
@@ -7154,6 +8951,11 @@
"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.",
@@ -7435,6 +9237,10 @@
"type": "string",
"description": "Folder name where the template is placed."
},
+ "shared_link": {
+ "type": "boolean",
+ "description": "Indicates if the template is accessible by link."
+ },
"author": {
"type": "object",
"required": [
@@ -7543,6 +9349,7 @@
"folder_id": 2,
"folder_name": "Default",
"external_id": null,
+ "shared_link": true,
"author": {
"id": 1,
"first_name": "John",