You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docuseal/docs/openapi.json

12524 lines
543 KiB

{
"openapi": "3.1.0",
"servers": [
{
"url": "https://api.docuseal.com",
"description": "Global Server"
},
{
"url": "https://api.docuseal.eu",
"description": "EU Server"
}
],
"info": {
"version": "1.0.0",
"title": "DocuSeal API",
"description": "DocuSeal API specs",
"contact": {
"name": "DocuSeal",
"email": "admin@docuseal.com",
"url": "https://www.docuseal.com"
}
},
"components": {
"securitySchemes": {
"AuthToken": {
"type": "apiKey",
"in": "header",
"name": "X-Auth-Token"
}
}
},
"tags": [
{
"name": "Submissions",
"description": "Signature requests can be initiated with Submissions API. Submissions can contain one submitter if signed by a single party or multiple submitters if the document template form contains signatures and fields to be collected and filled by multiple parties. Initiate new submissions to request signatures for specified submitters via email or phone number."
},
{
"name": "Submitters",
"description": "Submitters API allows you to load all details provided by the signer of the document."
},
{
"name": "Templates",
"description": "Templates represent reusable document signing forms with fields and signatures to be collected. It's possible to create unique template forms with fields and signatures using HTML or with tagged PDFs."
}
],
"paths": {
"/templates": {
"get": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Templates"
],
"summary": "List all templates",
"description": "The API endpoint provides the ability to retrieve a list of available document templates.",
"operationId": "getTemplates",
"parameters": [
{
"name": "q",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Filter templates based on the name partial match."
},
{
"name": "slug",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Filter templates by unique slug.",
"example": "opaKWh8WWTAcVG"
},
{
"name": "external_id",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "The unique application-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external ID."
},
{
"name": "folder",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Filter templates by folder name."
},
{
"name": "archived",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
},
"description": "Get only archived templates instead of active ones."
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The number of templates to return. Default value is 10. Maximum value is 100."
},
{
"name": "after",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the template to start the list from. It allows you to receive only templates with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."
},
{
"name": "before",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the template to end the list with. It allows you to receive only templates with an ID less than the specified value."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"description": "List of templates.",
"items": {
"type": "object",
"required": [
"id",
"slug",
"name",
"preferences",
"schema",
"fields",
"submitters",
"author_id",
"created_at",
"updated_at",
"source",
"external_id",
"folder_id",
"folder_name",
"author",
"documents"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"slug": {
"type": "string",
"description": "Unique slug of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"preferences": {
"type": "object",
"description": "Template preferences."
},
"schema": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"attachment_uuid",
"name"
],
"properties": {
"attachment_uuid": {
"type": "string",
"description": "Unique identifier of attached document to the template."
},
"name": {
"type": "string",
"description": "Name of the attached document to the template."
}
}
}
},
"fields": {
"type": "array",
"description": "List of fields to be filled in the template.",
"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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"submitters": {
"type": "array",
"description": "The list of submitters for the template.",
"items": {
"type": "object",
"required": [
"name",
"uuid"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the submitter."
}
}
}
},
"author_id": {
"type": "integer",
"description": "Unique identifier of the author of the template."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the template was archived."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
},
"source": {
"type": "string",
"description": "Source of the template.",
"enum": [
"native",
"api",
"embed"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this template within your app."
},
"folder_id": {
"type": "integer",
"description": "Unique identifier of the folder where the template is located."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is located."
},
"shared_link": {
"type": "boolean",
"description": "Indicates if the template is accessible by link."
},
"author": {
"type": "object",
"required": [
"id",
"first_name",
"last_name",
"email"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the author."
},
"first_name": {
"type": "string",
"description": "First name of the author."
},
"last_name": {
"type": "string",
"description": "Last name of the author."
},
"email": {
"type": "string",
"description": "Author email."
}
}
},
"documents": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"id",
"uuid",
"url",
"preview_image_url",
"filename"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the document."
},
"url": {
"type": "string",
"description": "URL of the document."
},
"preview_image_url": {
"type": "string",
"description": "Document preview image URL."
},
"filename": {
"type": "string",
"description": "Document filename."
}
}
}
}
}
}
},
"pagination": {
"type": "object",
"required": [
"count",
"next",
"prev"
],
"properties": {
"count": {
"type": "integer",
"description": "Templates count."
},
"next": {
"type": [
"integer",
"null"
],
"description": "The ID of the template after which the next page starts."
},
"prev": {
"type": [
"integer",
"null"
],
"description": "The ID of the template before which the previous page ends."
}
}
}
}
},
"example": {
"data": [
{
"id": 1,
"slug": "iRgjDX7WDK6BRo",
"name": "Example Template",
"preferences": {},
"schema": [
{
"attachment_uuid": "d94e615f-76e3-46d5-8f98-36bdacb8664a",
"name": "example-document"
}
],
"fields": [
{
"uuid": "594bdf04-d941-4ca6-aa73-93e61d625c02",
"submitter_uuid": "0954d146-db8c-4772-aafe-2effc7c0e0c0",
"name": "Full Name",
"type": "text",
"required": true,
"preferences": {},
"areas": [
{
"x": 0.2638888888888889,
"y": 0.168958742632613,
"w": 0.325,
"h": 0.04616895874263263,
"attachment_uuid": "d94e615f-76e3-46d5-8f98-36bdacb8664a",
"page": 0
}
]
}
],
"submitters": [
{
"name": "First Party",
"uuid": "0954d146-db8c-4772-aafe-2effc7c0e0c0"
}
],
"author_id": 1,
"archived_at": null,
"created_at": "2023-12-14T15:21:57.375Z",
"updated_at": "2023-12-14T15:22:55.094Z",
"source": "native",
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
"shared_link": true,
"author": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"documents": [
{
"id": 5,
"uuid": "d94e615f-76e3-46d5-8f98-36bdacb8664a",
"url": "https://docuseal.com/file/hash/sample-document.pdf",
"preview_image_url": "https://docuseal.com/file/hash/0.jpg",
"filename": "example-document.pdf"
}
]
}
],
"pagination": {
"count": 1,
"next": 1,
"prev": 2
}
}
}
}
}
}
}
},
"/templates/{id}": {
"get": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Templates"
],
"summary": "Get a template",
"description": "The API endpoint provides the functionality to retrieve information about a document template.",
"operationId": "getTemplate",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the document template.",
"example": 1000001
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"slug",
"name",
"preferences",
"schema",
"fields",
"submitters",
"author_id",
"archived_at",
"created_at",
"updated_at",
"source",
"external_id",
"folder_id",
"folder_name",
"author",
"documents"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"slug": {
"type": "string",
"description": "Unique slug of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"preferences": {
"type": "object",
"description": "Template preferences."
},
"schema": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"attachment_uuid",
"name"
],
"properties": {
"attachment_uuid": {
"type": "string",
"description": "Unique identifier of attached document to the template."
},
"name": {
"type": "string",
"description": "Name of the attached document to the template."
}
}
}
},
"fields": {
"type": "array",
"description": "List of fields to be filled in the template.",
"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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"submitters": {
"type": "array",
"description": "The list of submitters for the template.",
"items": {
"type": "object",
"required": [
"name",
"uuid"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the submitter."
}
}
}
},
"author_id": {
"type": "integer",
"description": "Unique identifier of the author of the template."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the template was archived."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
},
"source": {
"type": "string",
"description": "Source of the template.",
"enum": [
"native",
"api",
"embed"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this template within your app."
},
"folder_id": {
"type": "integer",
"description": "Unique identifier of the folder where the template is located."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is located."
},
"shared_link": {
"type": "boolean",
"description": "Indicates if the template is accessible by link."
},
"author": {
"type": "object",
"required": [
"id",
"first_name",
"last_name",
"email"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the author."
},
"first_name": {
"type": "string",
"description": "First name of the author."
},
"last_name": {
"type": "string",
"description": "Last name of the author."
},
"email": {
"type": "string",
"description": "Author email."
}
}
},
"documents": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"id",
"uuid",
"url",
"preview_image_url",
"filename"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the document."
},
"url": {
"type": "string",
"description": "URL of the document."
},
"preview_image_url": {
"type": "string",
"description": "Document preview image URL."
},
"filename": {
"type": "string",
"description": "Document filename."
}
}
}
}
}
},
"example": {
"id": 1,
"slug": "iRgjDX7WDK6BRo",
"name": "Example Template",
"preferences": {},
"schema": [
{
"attachment_uuid": "d94e615f-76e3-46d5-8f98-36bdacb8664a",
"name": "example-document"
}
],
"fields": [
{
"uuid": "594bdf04-d941-4ca6-aa73-93e61d625c02",
"submitter_uuid": "0954d146-db8c-4772-aafe-2effc7c0e0c0",
"name": "Full Name",
"type": "text",
"required": true,
"preferences": {},
"areas": [
{
"x": 0.2638888888888889,
"y": 0.168958742632613,
"w": 0.325,
"h": 0.04616895874263263,
"attachment_uuid": "d94e615f-76e3-46d5-8f98-36bdacb8664a",
"page": 0
}
]
}
],
"submitters": [
{
"name": "First Party",
"uuid": "0954d146-db8c-4772-aafe-2effc7c0e0c0"
}
],
"author_id": 1,
"archived_at": null,
"created_at": "2023-12-14T15:21:57.375Z",
"updated_at": "2023-12-14T15:22:55.094Z",
"source": "native",
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
"shared_link": true,
"author": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"documents": [
{
"id": 5,
"uuid": "d94e615f-76e3-46d5-8f98-36bdacb8664a",
"url": "https://docuseal.com/file/hash/sample-document.pdf",
"preview_image_url": "https://docuseal.com/file/hash/0.jpg",
"filename": "example-document.pdf"
}
]
}
}
}
}
}
},
"delete": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Templates"
],
"summary": "Archive a template",
"description": "The API endpoint allows you to archive a document template.",
"operationId": "archiveTemplate",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the document template.",
"example": 1000001
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"archived_at"
],
"properties": {
"id": {
"type": "integer",
"description": "Template unique ID number."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the template was archived."
}
}
},
"example": {
"id": 1,
"archived_at": "2023-12-14T15:50:21.799Z"
}
}
}
}
}
},
"put": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Templates"
],
"summary": "Update a template",
"description": "The API endpoint provides the functionality to move a document template to a different folder and update the name of the template.",
"operationId": "updateTemplate",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the document template.",
"example": 1000001
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the template.",
"examples": [
"New Document Name"
]
},
"folder_name": {
"type": "string",
"description": "The folder's name to which the template should be moved.",
"examples": [
"New Folder"
]
},
"roles": {
"type": "array",
"description": "An array of submitter role names to update the template with.",
"items": {
"type": "string"
},
"examples": [
[
"Agent",
"Customer"
]
]
},
"archived": {
"type": "boolean",
"description": "Set `false` to unarchive template."
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"updated_at"
],
"properties": {
"id": {
"type": "integer",
"description": "Template unique ID number."
},
"updated_at": {
"type": "string",
"description": "Date and time when the template was last updated."
}
}
},
"example": {
"id": 1,
"updated_at": "2023-12-14T15:50:21.799Z"
}
}
}
}
}
}
},
"/submissions": {
"get": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "List all submissions",
"description": "The API endpoint provides the ability to retrieve a list of available submissions.",
"operationId": "getSubmissions",
"parameters": [
{
"name": "template_id",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The template ID allows you to receive only the submissions created from that specific template."
},
{
"name": "status",
"in": "query",
"required": false,
"schema": {
"type": "string",
"enum": [
"pending",
"completed",
"declined",
"expired"
]
},
"description": "Filter submissions by status."
},
{
"name": "q",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Filter submissions based on submitter's name, email or phone partial match."
},
{
"name": "slug",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Filter submissions by unique slug.",
"example": "NtLDQM7eJX2ZMd"
},
{
"name": "template_folder",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Filter submissions by template folder name."
},
{
"name": "archived",
"in": "query",
"required": false,
"schema": {
"type": "boolean"
},
"description": "Returns only archived submissions when `true` and only active submissions when `false`."
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The number of submissions to return. Default value is 10. Maximum value is 100."
},
{
"name": "after",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."
},
{
"name": "before",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"data",
"pagination"
],
"properties": {
"data": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"source",
"slug",
"status",
"submitters_order",
"audit_log_url",
"completed_at",
"created_at",
"updated_at",
"submitters",
"created_by_user"
],
"properties": {
"id": {
"type": "integer",
"description": "Submission unique ID number."
},
"name": {
"type": "string",
"description": "Name of the document submission.",
"examples": [
"Test Submission Document"
]
},
"source": {
"type": "string",
"description": "The source of the submission.",
"enum": [
"invite",
"bulk",
"api",
"embed",
"link"
]
},
"slug": {
"type": "string",
"description": "Unique slug of the submission."
},
"status": {
"type": "string",
"description": "The status of the submission.",
"enum": [
"completed",
"declined",
"expired",
"pending"
]
},
"submitters_order": {
"type": "string",
"description": "The order of submitters.",
"enum": [
"random",
"preserved"
]
},
"audit_log_url": {
"type": [
"string",
"null"
],
"description": "Audit log file URL."
},
"combined_document_url": {
"type": [
"string",
"null"
],
"description": "Combined PDF file URL with documents and Audit Log."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submission was completed."
},
"created_at": {
"type": "string",
"description": "The date and time when the submission was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the submission was last updated."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submission was archived."
},
"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": "Submitter unique ID number."
},
"submission_id": {
"type": "integer",
"description": "Submission unique ID number."
},
"uuid": {
"type": "string",
"description": "Submitter UUID."
},
"email": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter."
},
"external_id": {
"type": [
"string",
"null"
],
"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 in the signing process."
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information."
},
"preferences": {
"type": "object",
"description": "Submitter preferences."
}
}
}
},
"template": {
"type": "object",
"required": [
"id",
"name",
"external_id",
"folder_name",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this template within your app."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is located."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
}
}
},
"created_by_user": {
"type": [
"object",
"null"
],
"required": [
"id",
"first_name",
"last_name",
"email"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the user who created the submission."
},
"first_name": {
"type": "string",
"description": "The first name of the user who created the submission."
},
"last_name": {
"type": "string",
"description": "The last name of the user who created the submission."
},
"email": {
"type": "string",
"description": "The email address of the user who created the submission."
}
}
}
}
}
},
"pagination": {
"type": "object",
"required": [
"count",
"next",
"prev"
],
"properties": {
"count": {
"type": "integer",
"description": "Submissions count."
},
"next": {
"type": [
"integer",
"null"
],
"description": "The ID of the submission after which the next page starts."
},
"prev": {
"type": [
"integer",
"null"
],
"description": "The ID of the submission before which the previous page ends."
}
}
}
}
},
"example": {
"data": [
{
"id": 1,
"name": null,
"source": "link",
"submitters_order": "random",
"slug": "VyL4szTwYoSvXq",
"status": "completed",
"audit_log_url": "https://docuseal.com/file/hash/example.pdf",
"combined_document_url": null,
"expire_at": null,
"completed_at": "2023-12-10T15:49:21.895Z",
"created_at": "2023-12-10T15:48:17.166Z",
"updated_at": "2023-12-10T15:49:21.895Z",
"archived_at": null,
"submitters": [
{
"id": 1,
"submission_id": 1,
"uuid": "0954d146-db8c-4772-aafe-2effc7c0e0c0",
"email": "submitter@example.com",
"slug": "dsEeWrhRD8yDXT",
"sent_at": "2023-12-14T15:45:49.011Z",
"opened_at": "2023-12-14T15:48:23.011Z",
"completed_at": "2023-12-14T15:49:21.701Z",
"declined_at": null,
"created_at": "2023-12-10T15:48:17.173Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"name": "John Doe",
"phone": "+1234567890",
"status": "completed",
"role": "First Party",
"metadata": {},
"preferences": {}
}
],
"template": {
"id": 1,
"name": "Example Template",
"external_id": "Temp123",
"folder_name": "Default",
"created_at": "2023-12-14T15:50:21.799Z",
"updated_at": "2023-12-14T15:50:21.799Z"
},
"created_by_user": {
"id": 1,
"first_name": "Bob",
"last_name": "Smith",
"email": "bob.smith@example.com"
}
}
],
"pagination": {
"count": 1,
"next": 1,
"prev": 1
}
}
}
}
}
}
},
"post": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create a submission",
"description": "This API endpoint allows you to create signature requests (submissions) for a document template and send them to the specified submitters (signers).<br><b>Related Guides</b><br><a href=\"https://www.docuseal.com/guides/send-documents-for-signature-via-api\" class=\"link\">Send documents for signature via API</a><br><a href=\"https://www.docuseal.com/guides/pre-fill-pdf-document-form-fields-with-api\" class=\"link\">Pre-fill PDF document form fields with API</a>",
"operationId": "createSubmission",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"template_id",
"submitters"
],
"properties": {
"template_id": {
"type": "integer",
"description": "The unique identifier of the template. Document template forms can be created via the Web UI, <a href=\"https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form\" class=\"link\">PDF and DOCX API</a>, or <a href=\"https://www.docuseal.com/guides/create-pdf-document-fillable-form-with-html-api\" class=\"link\">HTML API</a>.",
"examples": [
1000001
]
},
"send_email": {
"type": "boolean",
"description": "Set `false` to disable signature request emails sending.",
"default": true
},
"send_sms": {
"type": "boolean",
"description": "Set `true` to send signature request via phone number and SMS.",
"default": false
},
"order": {
"type": "string",
"description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
"default": "preserved",
"enum": [
"preserved",
"random"
]
},
"completed_redirect_url": {
"type": "string",
"description": "Specify URL to redirect to after the submission completion."
},
"bcc_completed": {
"type": "string",
"description": "Specify BCC address to send signed documents to after the completion."
},
"reply_to": {
"type": "string",
"description": "Specify Reply-To address to use in the notification emails."
},
"expire_at": {
"type": "string",
"description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
"examples": [
"2024-09-01 12:00:00 UTC"
]
},
"variables": {
"type": "object",
"description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in dynamic template documents.",
"examples": [
{
"variable_name": "value"
}
]
},
"message": {
"type": "object",
"description": "Custom signature request email message.",
"properties": {
"subject": {
"type": "string",
"description": "Custom signature request email subject."
},
"body": {
"type": "string",
"description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
}
}
},
"submitters": {
"type": "array",
"description": "The list of submitters for the submission.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"role": {
"type": "string",
"description": "The role name or title of the submitter.",
"examples": [
"First Party"
]
},
"email": {
"type": "string",
"description": "The email address of the submitter.",
"format": "email",
"examples": [
"john.doe@example.com"
]
},
"phone": {
"type": "string",
"description": "The phone number of the submitter, formatted according to the E.164 standard.",
"examples": [
"+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.",
"examples": [
"{ \"customField\": \"value\" }"
]
},
"send_email": {
"type": "boolean",
"description": "Set `false` to disable signature request emails sending only for this submitter.",
"default": true
},
"send_sms": {
"type": "boolean",
"description": "Set `true` to send signature request via phone number and SMS.",
"default": false
},
"reply_to": {
"type": "string",
"description": "Specify Reply-To address to use in the notification emails for this submitter."
},
"completed_redirect_url": {
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"require_phone_2fa": {
"type": "boolean",
"description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
"default": false
},
"require_email_2fa": {
"type": "boolean",
"description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
"default": false
},
"message": {
"type": "object",
"description": "Custom signature request email message for the submitter.",
"properties": {
"subject": {
"type": "string",
"description": "Custom signature request email subject for the submitter."
},
"body": {
"type": "string",
"description": "Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
}
}
},
"fields": {
"type": "array",
"description": "A list of configurations for template document form fields.",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Document template field name.",
"examples": [
"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.",
"examples": [
"Acme"
]
},
"readonly": {
"type": "boolean",
"description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
"default": false
},
"required": {
"type": "boolean",
"description": "Set `true` to make the field required."
},
"title": {
"type": "string",
"description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
},
"description": {
"type": "string",
"description": "Field description displayed on the signing form. Supports Markdown."
},
"validation": {
"type": "object",
"description": "Field validation rules.",
"properties": {
"pattern": {
"type": "string",
"description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
"examples": [
"[A-Z]{4}"
]
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"properties": {
"font_size": {
"type": "integer",
"description": "Font size of the field value in pixels.",
"examples": [
12
]
},
"font_type": {
"type": "string",
"description": "Font type of the field value.",
"enum": [
"bold",
"italic",
"bold_italic"
]
},
"font": {
"type": "string",
"description": "Font family of the field value.",
"enum": [
"Times",
"Helvetica",
"Courier"
]
},
"color": {
"type": "string",
"description": "Font color of the field value.",
"enum": [
"black",
"white",
"blue"
],
"default": "black"
},
"background": {
"type": "string",
"description": "Field box background color.",
"enum": [
"black",
"white",
"blue"
]
},
"align": {
"type": "string",
"description": "Horizontal alignment of the field text value.",
"enum": [
"left",
"center",
"right"
],
"default": "left"
},
"valign": {
"type": "string",
"description": "Vertical alignment of the field text value.",
"enum": [
"top",
"center",
"bottom"
],
"default": "center"
},
"format": {
"type": "string",
"description": "The data format for different field types.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- Number field: accepts currency formats such as usd, eur, gbp.",
"examples": [
"DD/MM/YYYY"
]
},
"price": {
"type": "number",
"description": "Price value of the payment field. Only for payment fields.",
"examples": [
99.99
]
},
"currency": {
"type": "string",
"description": "Currency value of the payment field. Only for payment fields.",
"enum": [
"USD",
"EUR",
"GBP",
"CAD",
"AUD"
],
"default": "USD"
},
"mask": {
"description": "Set `true` to make sensitive data masked on the document.",
"oneOf": [
{
"type": "integer"
},
{
"type": "boolean"
}
],
"default": false
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"roles": {
"type": "array",
"description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"submission_id",
"uuid",
"email",
"slug",
"status",
"values",
"metadata",
"sent_at",
"opened_at",
"completed_at",
"declined_at",
"created_at",
"updated_at",
"name",
"phone",
"external_id",
"preferences",
"role",
"embed_src"
],
"properties": {
"id": {
"type": "integer",
"description": "Submitter unique ID number."
},
"submission_id": {
"type": "integer",
"description": "Submission unique ID number."
},
"uuid": {
"type": "string",
"description": "Submitter UUID."
},
"email": {
"type": [
"string",
"null"
],
"description": "The email address of the submitter."
},
"slug": {
"type": "string",
"description": "Unique key to be used in the form signing link and embedded form."
},
"status": {
"type": "string",
"description": "The status of signing request for the submitter.",
"enum": [
"completed",
"declined",
"opened",
"sent",
"awaiting"
]
},
"values": {
"type": "array",
"description": "An array of pre-filled values for the submitter.",
"items": {
"type": "object",
"required": [
"field",
"value"
],
"properties": {
"field": {
"type": "string",
"description": "Document template field name."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
],
"description": "Pre-filled value of the field."
}
}
}
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information."
},
"sent_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter."
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this submitter within your app."
},
"preferences": {
"type": "object",
"description": "Submitter preferences.",
"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"
}
]
}
}
}
}
}
},
"/submissions/{id}": {
"get": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Get a submission",
"description": "The API endpoint provides the functionality to retrieve information about a submission.",
"operationId": "getSubmission",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the submission.",
"example": 1001
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"slug",
"source",
"submitters_order",
"audit_log_url",
"combined_document_url",
"created_at",
"updated_at",
"archived_at",
"submitters",
"created_by_user",
"submission_events",
"documents",
"status",
"metadata",
"completed_at"
],
"properties": {
"id": {
"type": "integer",
"description": "Submission unique ID number."
},
"name": {
"type": "string",
"description": "Name of the document submission.",
"examples": [
"Test Submission Document"
]
},
"slug": {
"type": "string",
"description": "Unique slug of the submission."
},
"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"
]
},
"audit_log_url": {
"type": [
"string",
"null"
],
"description": "Audit log file URL."
},
"combined_document_url": {
"type": [
"string",
"null"
],
"description": "Combined PDF file URL with documents and Audit Log."
},
"created_at": {
"type": "string",
"description": "The date and time when the submission was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the submission was last updated."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submission was archived."
},
"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",
"external_id",
"status",
"values",
"documents",
"role"
],
"properties": {
"id": {
"type": "integer",
"description": "Submitter unique ID number."
},
"submission_id": {
"type": "integer",
"description": "Submission unique ID number."
},
"uuid": {
"type": "string",
"description": "Submitter UUID."
},
"email": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter."
},
"external_id": {
"type": [
"string",
"null"
],
"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"
]
},
"values": {
"type": "array",
"description": "An array of pre-filled values for the submitter.",
"items": {
"type": "object",
"required": [
"field",
"value"
],
"properties": {
"field": {
"type": "string",
"description": "Document template field name."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
],
"description": "Pre-filled value of the field."
}
}
}
},
"documents": {
"type": "array",
"description": "An array of completed or signed documents by the submitter.",
"items": {
"type": "object",
"required": [
"name",
"url"
],
"properties": {
"name": {
"type": "string",
"description": "Document name."
},
"url": {
"type": "string",
"description": "Document URL."
}
}
}
},
"role": {
"type": "string",
"description": "The role of the submitter in the signing process."
}
}
}
},
"template": {
"type": "object",
"required": [
"id",
"name",
"external_id",
"folder_name",
"created_at",
"updated_at"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this template within your app."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is located."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
}
}
},
"created_by_user": {
"type": [
"object",
"null"
],
"required": [
"id",
"first_name",
"last_name",
"email"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the user who created the submission."
},
"first_name": {
"type": "string",
"description": "The first name of the user who created the submission."
},
"last_name": {
"type": "string",
"description": "The last name of the user who created the submission."
},
"email": {
"type": "string",
"description": "The email address of the user who created the submission."
}
}
},
"submission_events": {
"type": "array",
"description": "An array of events related to the submission.",
"items": {
"type": "object",
"required": [
"id",
"submitter_id",
"event_type",
"event_timestamp"
],
"properties": {
"id": {
"type": "integer",
"description": "Submission event unique ID number."
},
"submitter_id": {
"type": "integer",
"description": "Unique identifier of the submitter that triggered the event."
},
"event_type": {
"type": "string",
"description": "Event type.",
"enum": [
"send_email",
"bounce_email",
"complaint_email",
"send_reminder_email",
"send_sms",
"send_2fa_sms",
"open_email",
"click_email",
"click_sms",
"phone_verified",
"start_form",
"start_verification",
"complete_verification",
"view_form",
"invite_party",
"complete_form",
"decline_form",
"api_complete_form"
]
},
"event_timestamp": {
"type": "string",
"description": "Date and time when the event was triggered."
},
"data": {
"type": "object",
"description": "Additional event details object."
}
}
}
},
"documents": {
"type": "array",
"description": "An array of completed or signed documents of the submission.",
"items": {
"type": "object",
"required": [
"name",
"url"
],
"properties": {
"name": {
"type": "string",
"description": "Document name."
},
"url": {
"type": "string",
"description": "Document URL."
}
}
}
},
"status": {
"type": "string",
"description": "The status of the submission.",
"enum": [
"completed",
"declined",
"expired",
"pending"
]
},
"metadata": {
"type": "object",
"description": "Object with custom metadata."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submission was completed."
}
}
},
"example": {
"id": 1,
"name": null,
"source": "link",
"submitters_order": "random",
"slug": "VyL4szTwYoSvXq",
"audit_log_url": "https://docuseal.com/blobs/proxy/hash/example.pdf",
"combined_document_url": null,
"completed_at": "2023-12-14T15:49:21.701Z",
"expire_at": null,
"created_at": "2023-12-10T15:48:17.166Z",
"updated_at": "2023-12-10T15:49:21.895Z",
"archived_at": null,
"submitters": [
{
"id": 1,
"submission_id": 1,
"uuid": "0954d146-db8c-4772-aafe-2effc7c0e0c0",
"email": "submitter@example.com",
"slug": "dsEeWrhRD8yDXT",
"sent_at": "2023-12-14T15:45:49.011Z",
"opened_at": "2023-12-14T15:48:23.011Z",
"completed_at": "2023-12-14T15:49:21.701Z",
"declined_at": null,
"created_at": "2023-12-14T15:48:17.173Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"name": "John Doe",
"phone": "+1234567890",
"external_id": null,
"status": "completed",
"metadata": {},
"values": [
{
"field": "Full Name",
"value": "John Doe"
}
],
"documents": [
{
"name": "example",
"url": "https://docuseal.com/blobs/proxy/hash/example.pdf"
}
],
"role": "First Party"
}
],
"template": {
"id": 1,
"name": "Example Template",
"external_id": "Temp123",
"folder_name": "Default",
"created_at": "2023-12-14T15:50:21.799Z",
"updated_at": "2023-12-14T15:50:21.799Z"
},
"created_by_user": {
"id": 1,
"first_name": "Bob",
"last_name": "Smith",
"email": "bob.smith@example.com"
},
"submission_events": [
{
"id": 1,
"submitter_id": 2,
"event_type": "view_form",
"event_timestamp": "2023-12-14T15:47:24.566Z",
"data": {}
}
],
"documents": [
{
"name": "example",
"url": "https://docuseal.com/file/hash/example.pdf"
}
],
"status": "completed"
}
}
}
}
}
},
"delete": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Archive a submission",
"description": "The API endpoint allows you to archive a submission.",
"operationId": "archiveSubmission",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the submission.",
"example": 1001
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"archived_at"
],
"properties": {
"id": {
"type": "integer",
"description": "Submission unique ID number."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the submission was archived."
}
}
},
"example": {
"id": 1,
"archived_at": "2023-12-14T15:50:21.799Z"
}
}
}
}
}
}
},
"/submissions/{id}/documents": {
"get": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Get submission documents",
"description": "This endpoint returns a list of partially filled documents for a submission. If the submission has been completed, the final signed documents are returned.",
"operationId": "getSubmissionDocuments",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the submission.",
"example": 1001
},
{
"name": "merge",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"default": false
},
"description": "When `true`, merges all documents into a single PDF.",
"example": false
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"documents"
],
"properties": {
"id": {
"type": "integer",
"description": "Submission unique ID number."
},
"documents": {
"type": "array",
"description": "An array of completed or signed documents of the submission.",
"items": {
"type": "object",
"required": [
"name",
"url"
],
"properties": {
"name": {
"type": "string",
"description": "Document name."
},
"url": {
"type": "string",
"description": "Document URL."
}
}
}
}
}
},
"example": {
"id": 1,
"documents": [
{
"name": "example",
"url": "https://docuseal.com/file/hash/example.pdf"
}
]
}
}
}
}
}
}
},
"/submissions/emails": {
"post": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create submissions from emails",
"description": "This API endpoint allows you to create submissions for a document template and send them to the specified email addresses. This is a simplified version of the POST /submissions API to be used with Zapier or other automation tools.",
"operationId": "createSubmissionsFromEmails",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"template_id",
"emails"
],
"properties": {
"template_id": {
"type": "integer",
"description": "The unique identifier of the template.",
"examples": [
1000001
]
},
"emails": {
"type": "string",
"description": "A comma-separated list of email addresses to send the submission to.",
"examples": [
"{{emails}}"
]
},
"send_email": {
"type": "boolean",
"description": "Set `false` to disable signature request emails sending.",
"default": true
},
"message": {
"type": "object",
"description": "Custom signature request email message.",
"properties": {
"subject": {
"type": "string",
"description": "Custom signature request email subject."
},
"body": {
"type": "string",
"description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "object",
"required": [
"id",
"submission_id",
"uuid",
"email",
"slug",
"status",
"values",
"metadata",
"sent_at",
"opened_at",
"completed_at",
"declined_at",
"created_at",
"updated_at",
"name",
"phone",
"external_id",
"preferences",
"role",
"embed_src"
],
"properties": {
"id": {
"type": "integer",
"description": "Submitter unique ID number."
},
"submission_id": {
"type": "integer",
"description": "Submission unique ID number."
},
"uuid": {
"type": "string",
"description": "Submitter UUID."
},
"email": {
"type": [
"string",
"null"
],
"description": "The email address of the submitter."
},
"slug": {
"type": "string",
"description": "Unique key to be used in the form signing link and embedded form."
},
"status": {
"type": "string",
"description": "The status of signing request for the submitter.",
"enum": [
"completed",
"declined",
"opened",
"sent",
"awaiting"
]
},
"values": {
"type": "array",
"description": "An array of pre-filled values for the submitter.",
"items": {
"type": "object",
"required": [
"field",
"value"
],
"properties": {
"field": {
"type": "string",
"description": "Document template field name."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
],
"description": "Pre-filled value of the field."
}
}
}
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information."
},
"sent_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter."
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this submitter within your app."
},
"preferences": {
"type": "object",
"description": "Submitter preferences.",
"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. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href=\"https://www.docuseal.com/examples/fieldtags.pdf\" target=\"_blank\" class=\"link font-bold\">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href=\"https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form\" class=\"link\">Use embedded text field tags to create a fillable form</a>\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.",
"examples": [
"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.",
"examples": [
"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": "An array of PDF documents to create a submission.",
"items": {
"type": "object",
"required": [
"name",
"file"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the document."
},
"file": {
"examples": [
"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",
"kba",
"strikethrough"
]
},
"role": {
"type": "string",
"description": "Role name of the signer."
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"title": {
"type": "string",
"description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
},
"description": {
"type": "string",
"description": "Field description displayed on the signing form. Supports Markdown."
},
"areas": {
"type": "array",
"description": "List of areas where the field is located in the document.",
"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.",
"examples": [
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"
},
"examples": [
[
"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",
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"role": {
"type": "string",
"description": "The role name or title of the submitter.",
"examples": [
"First Party"
]
},
"email": {
"type": "string",
"description": "The email address of the submitter.",
"format": "email",
"examples": [
"john.doe@example.com"
]
},
"phone": {
"type": "string",
"description": "The phone number of the submitter, formatted according to the E.164 standard.",
"examples": [
"+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.",
"examples": [
"{ \"customField\": \"value\" }"
]
},
"send_email": {
"type": "boolean",
"description": "Set `false` to disable signature request emails sending only for this submitter.",
"default": true
},
"send_sms": {
"type": "boolean",
"description": "Set `true` to send signature request via phone number and SMS.",
"default": false
},
"reply_to": {
"type": "string",
"description": "Specify Reply-To address to use in the notification emails for this submitter."
},
"completed_redirect_url": {
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"require_phone_2fa": {
"type": "boolean",
"description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
"default": false
},
"require_email_2fa": {
"type": "boolean",
"description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
"default": false
},
"invite_by": {
"type": "string",
"description": "Set the role name of the previous party that should invite this party via email."
},
"fields": {
"type": "array",
"description": "A list of configurations for document form fields.",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Document field name.",
"examples": [
"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.",
"examples": [
"Acme"
]
},
"readonly": {
"type": "boolean",
"description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
"default": false
},
"required": {
"type": "boolean",
"description": "Set `true` to make the field required."
},
"title": {
"type": "string",
"description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
},
"description": {
"type": "string",
"description": "Field description displayed on the signing form. Supports Markdown."
},
"validation": {
"type": "object",
"description": "Field validation rules.",
"properties": {
"pattern": {
"type": "string",
"description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
"examples": [
"[A-Z]{4}"
]
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"properties": {
"font_size": {
"type": "integer",
"description": "Font size of the field value in pixels.",
"examples": [
12
]
},
"font_type": {
"type": "string",
"description": "Font type of the field value.",
"enum": [
"bold",
"italic",
"bold_italic"
]
},
"font": {
"type": "string",
"description": "Font family of the field value.",
"enum": [
"Times",
"Helvetica",
"Courier"
]
},
"color": {
"type": "string",
"description": "Font color of the field value.",
"enum": [
"black",
"white",
"blue"
],
"default": "black"
},
"background": {
"type": "string",
"description": "Field box background color.",
"enum": [
"black",
"white",
"blue"
]
},
"align": {
"type": "string",
"description": "Horizontal alignment of the field text value.",
"enum": [
"left",
"center",
"right"
],
"default": "left"
},
"valign": {
"type": "string",
"description": "Vertical alignment of the field text value.",
"enum": [
"top",
"center",
"bottom"
],
"default": "center"
},
"format": {
"type": "string",
"description": "The data format for different field types.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- Number field: accepts currency formats such as usd, eur, gbp.",
"examples": [
"DD/MM/YYYY"
]
},
"price": {
"type": "number",
"description": "Price value of the payment field. Only for payment fields.",
"examples": [
99.99
]
},
"currency": {
"type": "string",
"description": "Currency value of the payment field. Only for payment fields.",
"enum": [
"USD",
"EUR",
"GBP",
"CAD",
"AUD"
],
"default": "USD"
},
"mask": {
"description": "Set `true` to make sensitive data masked on the document.",
"oneOf": [
{
"type": "integer"
},
{
"type": "boolean"
}
],
"default": false
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"roles": {
"type": "array",
"description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
"items": {
"type": "string"
}
}
}
}
},
"message": {
"type": "object",
"description": "Custom signature request email message.",
"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",
"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": "Submitter unique ID number."
},
"uuid": {
"type": "string",
"description": "Submitter UUID."
},
"email": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter."
},
"external_id": {
"type": [
"string",
"null"
],
"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"
]
},
"values": {
"type": "array",
"description": "An array of pre-filled values for the submitter.",
"items": {
"type": "object",
"required": [
"field",
"value"
],
"properties": {
"field": {
"type": "string",
"description": "Document template field name."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
],
"description": "Pre-filled value of the field."
}
}
}
},
"role": {
"type": "string",
"description": "The role of the submitter in the signing process."
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information."
},
"preferences": {
"type": "object",
"description": "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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"expire_at": {
"type": "string",
"description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
"examples": [
"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/docx": {
"post": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submissions"
],
"summary": "Create a submission from DOCX",
"description": "The API endpoint provides functionality to create a one-off submission request from a DOCX file with dynamic content variables. Use <code>[[variable_name]]</code> text tags to define dynamic content variables in the document. See <a href=\"https://www.docuseal.com/examples/demo_template.docx\" target=\"_blank\" class=\"link font-bold\">https://www.docuseal.com/examples/demo_template.docx</a> for the specific text variable syntax, including dynamic content tables and lists. You can also use the <code>{{signature}}</code> field syntax to define fillable fields, as in a PDF.<br><b>Related Guides</b><br><a href=\"https://www.docuseal.com/guides/use-dynamic-content-variables-in-docx-to-create-personalized-documents\" class=\"link\">Use dynamic content variables in DOCX to create personalized documents</a>",
"operationId": "createSubmissionFromDocx",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"documents",
"submitters"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the document submission.",
"examples": [
"Test Submission Document"
]
},
"send_email": {
"type": "boolean",
"description": "Set `false` to disable signature request emails sending.",
"default": true
},
"send_sms": {
"type": "boolean",
"description": "Set `true` to send signature request via phone number and SMS.",
"default": false
},
"variables": {
"type": "object",
"description": "Dynamic content variables object. Variable values can be strings, numbers, arrays, objects, or HTML content used to generate styled text, paragraphs, and tables in DOCX.",
"examples": [
{
"variable_name": "value"
}
]
},
"order": {
"type": "string",
"description": "Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.",
"default": "preserved",
"enum": [
"preserved",
"random"
]
},
"completed_redirect_url": {
"type": "string",
"description": "Specify URL to redirect to after the submission completion."
},
"bcc_completed": {
"type": "string",
"description": "Specify BCC address to send signed documents to after the completion."
},
"reply_to": {
"type": "string",
"description": "Specify Reply-To address to use in the notification emails."
},
"expire_at": {
"type": "string",
"description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
"examples": [
"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": "An array of DOCX documents to create a submission.",
"items": {
"type": "object",
"required": [
"name",
"file"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the document."
},
"file": {
"examples": [
"base64"
],
"type": "string",
"format": "base64",
"description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL."
},
"position": {
"type": "integer",
"description": "Document position in the submission. If not specified, the document will be added in the order it appears in the documents array."
}
}
}
},
"submitters": {
"type": "array",
"description": "The list of submitters for the submission.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"role": {
"type": "string",
"description": "The role name or title of the submitter.",
"examples": [
"First Party"
]
},
"email": {
"type": "string",
"description": "The email address of the submitter.",
"format": "email",
"examples": [
"john.doe@example.com"
]
},
"phone": {
"type": "string",
"description": "The phone number of the submitter, formatted according to the E.164 standard.",
"examples": [
"+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.",
"examples": [
"{ \"customField\": \"value\" }"
]
},
"send_email": {
"type": "boolean",
"description": "Set `false` to disable signature request emails sending only for this submitter.",
"default": true
},
"send_sms": {
"type": "boolean",
"description": "Set `true` to send signature request via phone number and SMS.",
"default": false
},
"reply_to": {
"type": "string",
"description": "Specify Reply-To address to use in the notification emails for this submitter."
},
"completed_redirect_url": {
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"require_phone_2fa": {
"type": "boolean",
"description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
"default": false
},
"require_email_2fa": {
"type": "boolean",
"description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
"default": false
},
"invite_by": {
"type": "string",
"description": "Set the role name of the previous party that should invite this party via email."
},
"fields": {
"type": "array",
"description": "A list of configurations for document form fields.",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Document field name.",
"examples": [
"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.",
"examples": [
"Acme"
]
},
"readonly": {
"type": "boolean",
"description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
"default": false
},
"required": {
"type": "boolean",
"description": "Set `true` to make the field required."
},
"title": {
"type": "string",
"description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
},
"description": {
"type": "string",
"description": "Field description displayed on the signing form. Supports Markdown."
},
"validation": {
"type": "object",
"description": "Field validation rules.",
"properties": {
"pattern": {
"type": "string",
"description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
"examples": [
"[A-Z]{4}"
]
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"properties": {
"font_size": {
"type": "integer",
"description": "Font size of the field value in pixels.",
"examples": [
12
]
},
"font_type": {
"type": "string",
"description": "Font type of the field value.",
"enum": [
"bold",
"italic",
"bold_italic"
]
},
"font": {
"type": "string",
"description": "Font family of the field value.",
"enum": [
"Times",
"Helvetica",
"Courier"
]
},
"color": {
"type": "string",
"description": "Font color of the field value.",
"enum": [
"black",
"white",
"blue"
],
"default": "black"
},
"background": {
"type": "string",
"description": "Field box background color.",
"enum": [
"black",
"white",
"blue"
]
},
"align": {
"type": "string",
"description": "Horizontal alignment of the field text value.",
"enum": [
"left",
"center",
"right"
],
"default": "left"
},
"valign": {
"type": "string",
"description": "Vertical alignment of the field text value.",
"enum": [
"top",
"center",
"bottom"
],
"default": "center"
},
"format": {
"type": "string",
"description": "The data format for different field types.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- Number field: accepts currency formats such as usd, eur, gbp.",
"examples": [
"DD/MM/YYYY"
]
},
"price": {
"type": "number",
"description": "Price value of the payment field. Only for payment fields.",
"examples": [
99.99
]
},
"currency": {
"type": "string",
"description": "Currency value of the payment field. Only for payment fields.",
"enum": [
"USD",
"EUR",
"GBP",
"CAD",
"AUD"
],
"default": "USD"
},
"mask": {
"description": "Set `true` to make sensitive data masked on the document.",
"oneOf": [
{
"type": "integer"
},
{
"type": "boolean"
}
],
"default": false
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"roles": {
"type": "array",
"description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
"items": {
"type": "string"
}
}
}
}
},
"message": {
"type": "object",
"description": "Custom signature request email message.",
"properties": {
"subject": {
"type": "string",
"description": "Custom signature request email subject."
},
"body": {
"type": "string",
"description": "Custom signature request email body. Can include the following variables: {{submission.name}}, {{submitter.link}}, {{account.name}}."
}
}
},
"merge_documents": {
"type": "boolean",
"description": "Set `true` to merge the documents into a single PDF file.",
"default": false
},
"remove_tags": {
"type": "boolean",
"description": "Pass `false` to disable the removal of {{text}} tags from the document. This can be used along with transparent text tags for faster and more robust document 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",
"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": "Submitter unique ID number."
},
"uuid": {
"type": "string",
"description": "Submitter UUID."
},
"email": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter."
},
"external_id": {
"type": [
"string",
"null"
],
"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"
]
},
"values": {
"type": "array",
"description": "An array of pre-filled values for the submitter.",
"items": {
"type": "object",
"required": [
"field",
"value"
],
"properties": {
"field": {
"type": "string",
"description": "Document template field name."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
],
"description": "Pre-filled value of the field."
}
}
}
},
"role": {
"type": "string",
"description": "The role of the submitter in the signing process."
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information."
},
"preferences": {
"type": "object",
"description": "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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"expire_at": {
"type": "string",
"description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
"examples": [
"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.<br><b>Related Guides</b><br><a href=\"https://www.docuseal.com/guides/create-pdf-document-fillable-form-with-html-api\" class=\"link\">Create PDF document fillable form with HTML</a>",
"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.",
"examples": [
"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.",
"examples": [
"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.",
"examples": [
"Test Document"
]
},
"html": {
"type": "string",
"description": "HTML document content with field tags.",
"examples": [
"<p>Lorem Ipsum is simply dummy text of the\n<text-field\n name=\"Industry\"\n role=\"First Party\"\n required=\"false\"\n style=\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\">\n</text-field>\nand typesetting industry</p>\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"
],
"examples": [
"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",
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"role": {
"type": "string",
"description": "The role name or title of the submitter.",
"examples": [
"First Party"
]
},
"email": {
"type": "string",
"description": "The email address of the submitter.",
"format": "email",
"examples": [
"john.doe@example.com"
]
},
"phone": {
"type": "string",
"description": "The phone number of the submitter, formatted according to the E.164 standard.",
"examples": [
"+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.",
"examples": [
"{ \"customField\": \"value\" }"
]
},
"send_email": {
"type": "boolean",
"description": "Set `false` to disable signature request emails sending only for this submitter.",
"default": true
},
"send_sms": {
"type": "boolean",
"description": "Set `true` to send signature request via phone number and SMS.",
"default": false
},
"reply_to": {
"type": "string",
"description": "Specify Reply-To address to use in the notification emails for this submitter."
},
"completed_redirect_url": {
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"order": {
"type": "integer",
"description": "The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."
},
"require_phone_2fa": {
"type": "boolean",
"description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
"default": false
},
"require_email_2fa": {
"type": "boolean",
"description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
"default": false
},
"invite_by": {
"type": "string",
"description": "Set the role name of the previous party that should invite this party via email."
},
"fields": {
"type": "array",
"description": "A list of configurations for document form fields.",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Document field name.",
"examples": [
"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.",
"examples": [
"Acme"
]
},
"readonly": {
"type": "boolean",
"description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
"default": false
},
"required": {
"type": "boolean",
"description": "Set `true` to make the field required."
},
"title": {
"type": "string",
"description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
},
"description": {
"type": "string",
"description": "Field description displayed on the signing form. Supports Markdown."
},
"validation": {
"type": "object",
"description": "Field validation rules.",
"properties": {
"pattern": {
"type": "string",
"description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
"examples": [
"[A-Z]{4}"
]
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"properties": {
"font_size": {
"type": "integer",
"description": "Font size of the field value in pixels.",
"examples": [
12
]
},
"font_type": {
"type": "string",
"description": "Font type of the field value.",
"enum": [
"bold",
"italic",
"bold_italic"
]
},
"font": {
"type": "string",
"description": "Font family of the field value.",
"enum": [
"Times",
"Helvetica",
"Courier"
]
},
"color": {
"type": "string",
"description": "Font color of the field value.",
"enum": [
"black",
"white",
"blue"
],
"default": "black"
},
"background": {
"type": "string",
"description": "Field box background color.",
"enum": [
"black",
"white",
"blue"
]
},
"align": {
"type": "string",
"description": "Horizontal alignment of the field text value.",
"enum": [
"left",
"center",
"right"
],
"default": "left"
},
"valign": {
"type": "string",
"description": "Vertical alignment of the field text value.",
"enum": [
"top",
"center",
"bottom"
],
"default": "center"
},
"format": {
"type": "string",
"description": "The data format for different field types.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- Number field: accepts currency formats such as usd, eur, gbp.",
"examples": [
"DD/MM/YYYY"
]
},
"price": {
"type": "number",
"description": "Price value of the payment field. Only for payment fields.",
"examples": [
99.99
]
},
"currency": {
"type": "string",
"description": "Currency value of the payment field. Only for payment fields.",
"enum": [
"USD",
"EUR",
"GBP",
"CAD",
"AUD"
],
"default": "USD"
},
"mask": {
"description": "Set `true` to make sensitive data masked on the document.",
"oneOf": [
{
"type": "integer"
},
{
"type": "boolean"
}
],
"default": false
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
},
"roles": {
"type": "array",
"description": "A list of roles for the submitter. Use this param to merge multiple roles into one submitter.",
"items": {
"type": "string"
}
}
}
}
},
"message": {
"type": "object",
"description": "Custom signature request email message.",
"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",
"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": "Submitter unique ID number."
},
"uuid": {
"type": "string",
"description": "Submitter UUID."
},
"email": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter."
},
"external_id": {
"type": [
"string",
"null"
],
"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"
]
},
"values": {
"type": "array",
"description": "An array of pre-filled values for the submitter.",
"items": {
"type": "object",
"required": [
"field",
"value"
],
"properties": {
"field": {
"type": "string",
"description": "Document template field name."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
],
"description": "Pre-filled value of the field."
}
}
}
},
"role": {
"type": "string",
"description": "The role of the submitter in the signing process."
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information."
},
"preferences": {
"type": "object",
"description": "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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"expire_at": {
"type": "string",
"description": "Specify the expiration date and time after which the submission becomes unavailable for signature.",
"examples": [
"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"
}
}
}
}
}
}
},
"/submitters/{id}": {
"get": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submitters"
],
"summary": "Get a submitter",
"description": "The API endpoint provides functionality to retrieve information about a submitter, along with the submitter documents and field values.",
"operationId": "getSubmitter",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the submitter.",
"example": 500001
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"submission_id",
"uuid",
"email",
"slug",
"sent_at",
"opened_at",
"completed_at",
"declined_at",
"created_at",
"updated_at",
"name",
"phone",
"status",
"external_id",
"metadata",
"preferences",
"template",
"submission_events",
"values",
"documents",
"role"
],
"properties": {
"id": {
"type": "integer",
"description": "Submitter unique ID number."
},
"submission_id": {
"type": "integer",
"description": "Submission unique ID number."
},
"uuid": {
"type": "string",
"description": "Submitter UUID."
},
"email": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter."
},
"status": {
"type": "string",
"description": "The status of signing request for the submitter.",
"enum": [
"completed",
"declined",
"opened",
"sent",
"awaiting"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this submitter within your app."
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information."
},
"preferences": {
"type": "object",
"description": "Submitter preferences."
},
"template": {
"type": "object",
"required": [
"id",
"name",
"created_at",
"updated_at"
],
"description": "Base template details.",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"created_at": {
"type": "string",
"format": "date-time",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"format": "date-time",
"description": "The date and time when the template was last updated."
}
}
},
"submission_events": {
"type": "array",
"description": "An array of events related to the submission.",
"items": {
"type": "object",
"required": [
"id",
"submitter_id",
"event_type",
"event_timestamp"
],
"properties": {
"id": {
"type": "integer",
"description": "Submission event unique ID number."
},
"submitter_id": {
"type": "integer",
"description": "Unique identifier of the submitter that triggered the event."
},
"event_type": {
"type": "string",
"description": "Event type.",
"enum": [
"send_email",
"bounce_email",
"complaint_email",
"send_reminder_email",
"send_sms",
"send_2fa_sms",
"open_email",
"click_email",
"click_sms",
"phone_verified",
"start_form",
"start_verification",
"complete_verification",
"view_form",
"invite_party",
"complete_form",
"decline_form",
"api_complete_form"
]
},
"event_timestamp": {
"type": "string",
"description": "Date and time when the event was triggered."
},
"data": {
"type": "object",
"description": "Additional event details object."
}
}
}
},
"values": {
"type": "array",
"description": "An array of pre-filled values for the submitter.",
"items": {
"type": "object",
"required": [
"field",
"value"
],
"properties": {
"field": {
"type": "string",
"description": "Document template field name."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
],
"description": "Pre-filled value of the field."
}
}
}
},
"documents": {
"type": "array",
"description": "An array of completed or signed documents by the submitter.",
"items": {
"type": "object",
"required": [
"name",
"url"
],
"properties": {
"name": {
"type": "string",
"description": "Document name."
},
"url": {
"type": "string",
"description": "Document URL."
}
}
}
},
"role": {
"type": "string",
"description": "The role of the submitter in the signing process."
}
}
},
"example": {
"id": 7,
"submission_id": 3,
"uuid": "0954d146-db8c-4772-aafe-2effc7c0e0c0",
"email": "submitter@example.com",
"slug": "dsEeWrhRD8yDXT",
"sent_at": "2023-12-14T15:45:49.011Z",
"opened_at": "2023-12-14T15:48:23.011Z",
"completed_at": "2023-12-10T15:49:21.701Z",
"declined_at": null,
"created_at": "2023-12-14T15:48:17.173Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"name": "John Doe",
"phone": "+1234567890",
"status": "completed",
"external_id": null,
"metadata": {},
"preferences": {},
"template": {
"id": 2,
"name": "Example Template",
"created_at": "2023-12-14T15:50:21.799Z",
"updated_at": "2023-12-14T15:50:21.799Z"
},
"submission_events": [
{
"id": 12,
"submitter_id": 7,
"event_type": "view_form",
"event_timestamp": "2023-12-14T15:47:17.351Z",
"data": {}
}
],
"values": [
{
"field": "Full Name",
"value": "John Doe"
}
],
"documents": [
{
"name": "sample-document",
"url": "https://docuseal.com/file/hash/sample-document.pdf"
}
],
"role": "First Party"
}
}
}
}
}
},
"put": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submitters"
],
"summary": "Update a submitter",
"description": "The API endpoint allows you to update submitter details, pre-fill or update field values and re-send emails.<br><b>Related Guides</b><br><a href=\"https://www.docuseal.com/guides/pre-fill-pdf-document-form-fields-with-api#automatically_sign_documents_via_api\" class=\"link\">Automatically sign documents via API</a>",
"operationId": "updateSubmitter",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the submitter.",
"example": 500001
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"email": {
"type": "string",
"description": "The email address of the submitter.",
"format": "email",
"examples": [
"john.doe@example.com"
]
},
"phone": {
"type": "string",
"description": "The phone number of the submitter, formatted according to the E.164 standard.",
"examples": [
"+1234567890"
]
},
"values": {
"type": "object",
"description": "An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."
},
"external_id": {
"type": "string",
"description": "Your application-specific unique string key to identify this submitter within your app."
},
"send_email": {
"type": "boolean",
"description": "Set `true` to re-send signature request emails."
},
"send_sms": {
"type": "boolean",
"description": "Set `true` to re-send signature request via phone number SMS.",
"default": false
},
"reply_to": {
"type": "string",
"description": "Specify Reply-To address to use in the notification emails."
},
"completed": {
"type": "boolean",
"description": "Pass `true` to mark submitter as completed and auto-signed via API."
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information.",
"examples": [
"{ \"customField\": \"value\" }"
]
},
"completed_redirect_url": {
"type": "string",
"description": "Submitter specific URL to redirect to after the submission completion."
},
"require_phone_2fa": {
"type": "boolean",
"description": "Set to `true` to require phone 2FA verification via a one-time code sent to the phone number in order to access the documents.",
"default": false
},
"require_email_2fa": {
"type": "boolean",
"description": "Set to `true` to require email 2FA verification via a one-time code sent to the email address in order to access the documents.",
"default": false
},
"message": {
"type": "object",
"description": "Custom signature request email message.",
"properties": {
"subject": {
"type": "string",
"description": "Custom signature request email subject."
},
"body": {
"type": "string",
"description": "Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."
}
}
},
"fields": {
"type": "array",
"description": "A list of configurations for template document form fields.",
"items": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"description": "Document template field name.",
"examples": [
"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.",
"examples": [
"Acme"
]
},
"readonly": {
"type": "boolean",
"description": "Set `true` to make it impossible for the submitter to edit predefined field value.",
"default": false
},
"required": {
"type": "boolean",
"description": "Set `true` to make the field required."
},
"validation": {
"type": "object",
"description": "Field validation rules.",
"properties": {
"pattern": {
"type": "string",
"description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
"examples": [
"[A-Z]{4}"
]
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"properties": {
"font_size": {
"type": "integer",
"description": "Font size of the field value in pixels.",
"examples": [
12
]
},
"font_type": {
"type": "string",
"description": "Font type of the field value.",
"enum": [
"bold",
"italic",
"bold_italic"
]
},
"font": {
"type": "string",
"description": "Font family of the field value.",
"enum": [
"Times",
"Helvetica",
"Courier"
]
},
"color": {
"type": "string",
"description": "Font color of the field value.",
"enum": [
"black",
"white",
"blue"
],
"default": "black"
},
"background": {
"type": "string",
"description": "Field box background color.",
"enum": [
"black",
"white",
"blue"
]
},
"align": {
"type": "string",
"description": "Horizontal alignment of the field text value.",
"enum": [
"left",
"center",
"right"
],
"default": "left"
},
"valign": {
"type": "string",
"description": "Vertical alignment of the field text value.",
"enum": [
"top",
"center",
"bottom"
],
"default": "center"
},
"format": {
"type": "string",
"description": "The data format for different field types.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- Number field: accepts currency formats such as usd, eur, gbp.",
"examples": [
"DD/MM/YYYY"
]
},
"price": {
"type": "number",
"description": "Price value of the payment field. Only for payment fields.",
"examples": [
99.99
]
},
"currency": {
"type": "string",
"description": "Currency value of the payment field. Only for payment fields.",
"enum": [
"USD",
"EUR",
"GBP",
"CAD",
"AUD"
],
"default": "USD"
},
"mask": {
"description": "Set `true` to make sensitive data masked on the document.",
"oneOf": [
{
"type": "integer"
},
{
"type": "boolean"
}
],
"default": false
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"submission_id",
"uuid",
"email",
"slug",
"sent_at",
"opened_at",
"completed_at",
"declined_at",
"created_at",
"updated_at",
"name",
"phone",
"status",
"external_id",
"metadata",
"preferences",
"values",
"documents",
"role",
"embed_src"
],
"properties": {
"id": {
"type": "integer",
"description": "Submitter unique ID number."
},
"submission_id": {
"type": "integer",
"description": "Submission unique ID number."
},
"uuid": {
"type": "string",
"description": "Submitter UUID."
},
"email": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter."
},
"status": {
"type": "string",
"description": "The status of signing request for the submitter.",
"enum": [
"completed",
"declined",
"opened",
"sent",
"awaiting"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this submitter within your app."
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information."
},
"preferences": {
"type": "object",
"description": "Submitter preferences."
},
"values": {
"type": "array",
"description": "An array of pre-filled values for the submitter.",
"items": {
"type": "object",
"required": [
"field",
"value"
],
"properties": {
"field": {
"type": "string",
"description": "Document template field name."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
],
"description": "Pre-filled value of the field."
}
}
}
},
"documents": {
"type": "array",
"description": "An array of completed or signed documents by the submitter.",
"items": {
"type": "object",
"required": [
"name",
"url"
],
"properties": {
"name": {
"type": "string",
"description": "Document name."
},
"url": {
"type": "string",
"description": "Document URL."
}
}
}
},
"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": 12,
"uuid": "0954d146-db8c-4772-aafe-2effc7c0e0c0",
"email": "submitter@example.com",
"slug": "dsEeWrhRD8yDXT",
"sent_at": "2023-12-14T15:45:49.011Z",
"opened_at": "2023-12-14T15:48:23.011Z",
"completed_at": "2023-12-10T15:49:21.701Z",
"declined_at": null,
"created_at": "2023-12-14T15:48:17.173Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"name": "John Doe",
"phone": "+1234567890",
"status": "completed",
"external_id": null,
"metadata": {},
"preferences": {},
"values": [
{
"field": "Full Name",
"value": "John Doe"
}
],
"documents": [],
"role": "First Party",
"embed_src": "https://docuseal.com/s/pAMimKcyrLjqVt"
}
}
}
}
}
}
},
"/submitters": {
"get": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Submitters"
],
"summary": "List all submitters",
"description": "The API endpoint provides the ability to retrieve a list of submitters.",
"operationId": "getSubmitters",
"parameters": [
{
"name": "submission_id",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The submission ID allows you to receive only the submitters related to that specific submission."
},
{
"name": "q",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Filter submitters on name, email or phone partial match."
},
{
"name": "slug",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "Filter submitters by unique slug.",
"example": "zAyL9fH36Havvm"
},
{
"name": "completed_after",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
},
"example": "2024-03-05 9:32:20",
"description": "The date and time string value to filter submitters that completed the submission after the specified date and time."
},
{
"name": "completed_before",
"in": "query",
"required": false,
"schema": {
"type": "string",
"format": "date-time"
},
"example": "2024-03-06 19:32:20",
"description": "The date and time string value to filter submitters that completed the submission before the specified date and time."
},
{
"name": "external_id",
"in": "query",
"required": false,
"schema": {
"type": "string"
},
"description": "The unique application-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external ID."
},
{
"name": "limit",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The number of submitters to return. Default value is 10. Maximum value is 100."
},
{
"name": "after",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the submitter to start the list from. It allows you to receive only submitters with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."
},
{
"name": "before",
"in": "query",
"required": false,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the submitter to end the list with. It allows you to receive only submitters with an ID less than the specified value."
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"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",
"external_id",
"preferences",
"metadata",
"submission_events",
"values",
"documents",
"role"
],
"properties": {
"id": {
"type": "integer",
"description": "Submitter unique ID number."
},
"submission_id": {
"type": "integer",
"description": "Submission unique ID number."
},
"uuid": {
"type": "string",
"description": "Submitter UUID."
},
"email": {
"type": "string",
"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",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter."
},
"status": {
"type": "string",
"description": "The status of signing request for the submitter.",
"enum": [
"completed",
"declined",
"opened",
"sent",
"awaiting"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this submitter within your app."
},
"preferences": {
"type": "object",
"description": "Submitter preferences."
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information."
},
"submission_events": {
"type": "array",
"description": "An array of events related to the submission.",
"items": {
"type": "object",
"required": [
"id",
"submitter_id",
"event_type",
"event_timestamp"
],
"properties": {
"id": {
"type": "integer",
"description": "Submission event unique ID number."
},
"submitter_id": {
"type": "integer",
"description": "Unique identifier of the submitter that triggered the event."
},
"event_type": {
"type": "string",
"description": "Event type.",
"enum": [
"send_email",
"bounce_email",
"complaint_email",
"send_reminder_email",
"send_sms",
"send_2fa_sms",
"open_email",
"click_email",
"click_sms",
"phone_verified",
"start_form",
"start_verification",
"complete_verification",
"view_form",
"invite_party",
"complete_form",
"decline_form",
"api_complete_form"
]
},
"event_timestamp": {
"type": "string",
"description": "Date and time when the event was triggered."
},
"data": {
"type": "object",
"description": "Additional event details object."
}
}
}
},
"values": {
"type": "array",
"description": "An array of pre-filled values for the submitter.",
"items": {
"type": "object",
"required": [
"field",
"value"
],
"properties": {
"field": {
"type": "string",
"description": "Document template field name."
},
"value": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "number"
},
{
"type": "boolean"
}
]
}
}
],
"description": "Pre-filled value of the field."
}
}
}
},
"documents": {
"type": "array",
"description": "An array of completed or signed documents by the submitter.",
"items": {
"type": "object",
"required": [
"name",
"url"
],
"properties": {
"name": {
"type": "string",
"description": "Document name."
},
"url": {
"type": "string",
"description": "Document URL."
}
}
}
},
"role": {
"type": "string",
"description": "The role of the submitter in the signing process."
}
}
}
},
"pagination": {
"type": "object",
"required": [
"count",
"next",
"prev"
],
"properties": {
"count": {
"type": "integer",
"description": "Submitters count."
},
"next": {
"type": [
"integer",
"null"
],
"description": "The ID of the submitter after which the next page starts."
},
"prev": {
"type": [
"integer",
"null"
],
"description": "The ID of the submitter before which the previous page ends."
}
}
}
}
},
"example": {
"data": [
{
"id": 7,
"submission_id": 3,
"uuid": "0954d146-db8c-4772-aafe-2effc7c0e0c0",
"email": "submitter@example.com",
"slug": "dsEeWrhRD8yDXT",
"sent_at": "2023-12-14T15:45:49.011Z",
"opened_at": "2023-12-14T15:48:23.011Z",
"completed_at": "2023-12-14T15:49:21.701Z",
"declined_at": null,
"created_at": "2023-12-14T15:48:17.173Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"name": "John Doe",
"phone": "+1234567890",
"status": "completed",
"external_id": null,
"preferences": {},
"metadata": {},
"template": {
"id": 2,
"name": "Example Template",
"created_at": "2023-12-14T15:50:21.799Z",
"updated_at": "2023-12-14T15:50:21.799Z"
},
"submission_events": [
{
"id": 12,
"submitter_id": 7,
"event_type": "view_form",
"event_timestamp": "2023-12-14T15:48:17.351Z",
"data": {}
}
],
"values": [
{
"field": "Full Name",
"value": "John Doe"
}
],
"documents": [
{
"name": "sample-document",
"url": "https://docuseal.com/file/eyJfcmFpbHMiOnsiIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f9758362acced0f3c86cdffad02800e/sample-document.pdf"
}
],
"role": "First Party"
}
],
"pagination": {
"count": 1,
"next": 1,
"prev": 1
}
}
}
}
}
}
}
},
"/templates/{id}/documents": {
"put": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Templates"
],
"summary": "Update template documents",
"description": "The API endpoint allows you to add, remove or replace documents in the template with provided PDF/DOCX file or HTML content.",
"operationId": "addDocumentToTemplate",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the document template.",
"example": 1000001
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"documents": {
"type": "array",
"description": "The list of documents to add or replace in the template.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Document name. Random uuid will be assigned when not specified.",
"examples": [
"Test Template"
]
},
"file": {
"type": "string",
"format": "base64",
"description": "Base64-encoded content of the PDF or DOCX file or downloadable file URL. Leave it empty if you create a new document using HTML param."
},
"html": {
"type": "string",
"description": "HTML template with field tags. Leave it empty if you add a document via PDF or DOCX base64 encoded file param or URL."
},
"position": {
"type": "integer",
"description": "Position of the document. By default will be added as the last document in the template.",
"examples": [
0
]
},
"replace": {
"type": "boolean",
"default": false,
"description": "Set to `true` to replace existing document with a new file at `position`. Existing document fields will be transferred to the new document if it doesn't contain any fields."
},
"remove": {
"type": "boolean",
"default": false,
"description": "Set to `true` to remove existing document at given `position` or with given `name`."
}
}
}
},
"merge": {
"type": "boolean",
"default": false,
"description": "Set to `true` to merge all existing and new documents into a single PDF document in the template."
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"slug",
"name",
"preferences",
"schema",
"fields",
"submitters",
"author_id",
"archived_at",
"created_at",
"updated_at",
"source",
"external_id",
"folder_id",
"folder_name",
"author",
"documents"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"slug": {
"type": "string",
"description": "Unique slug of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"preferences": {
"type": "object",
"description": "Template preferences."
},
"schema": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"attachment_uuid",
"name"
],
"properties": {
"attachment_uuid": {
"type": "string",
"description": "Unique identifier of attached document to the template."
},
"name": {
"type": "string",
"description": "Name of the attached document to the template."
}
}
}
},
"fields": {
"type": "array",
"description": "List of fields to be filled in the template.",
"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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"submitters": {
"type": "array",
"description": "The list of submitters for the template.",
"items": {
"type": "object",
"required": [
"name",
"uuid"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the submitter."
}
}
}
},
"author_id": {
"type": "integer",
"description": "Unique identifier of the author of the template."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the template was archived."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
},
"source": {
"type": "string",
"description": "Source of the template.",
"enum": [
"native",
"api",
"embed"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this template within your app."
},
"folder_id": {
"type": "integer",
"description": "Unique identifier of the folder where the template is located."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is located."
},
"shared_link": {
"type": "boolean",
"description": "Indicates if the template is accessible by link."
},
"author": {
"type": "object",
"required": [
"id",
"first_name",
"last_name",
"email"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the author."
},
"first_name": {
"type": "string",
"description": "First name of the author."
},
"last_name": {
"type": "string",
"description": "Last name of the author."
},
"email": {
"type": "string",
"description": "Author email."
}
}
},
"documents": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"id",
"uuid",
"url",
"preview_image_url",
"filename"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the document."
},
"url": {
"type": "string",
"description": "URL of the document."
},
"preview_image_url": {
"type": "string",
"description": "Document preview image URL."
},
"filename": {
"type": "string",
"description": "Document filename."
}
}
}
}
}
},
"example": {
"id": 3,
"slug": "ZQpF222rFBv71q",
"name": "Demo Template",
"schema": [
{
"name": "Demo Template",
"attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5"
}
],
"fields": [
{
"name": "Name",
"required": false,
"type": "text",
"uuid": "a06c49f6-4b20-4442-ac7f-c1040d2cf1ac",
"submitter_uuid": "93ba628c-5913-4456-a1e9-1a81ad7444b3",
"areas": [
{
"page": 0,
"attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5",
"x": 0.403158189124654,
"y": 0.04211750189825361,
"w": 0.100684625476058,
"h": 0.01423690205011389
}
]
}
],
"submitters": [
{
"name": "Submitter",
"uuid": "93ba628c-5913-4456-a1e9-1a81ad7444b3"
}
],
"author_id": 1,
"archived_at": null,
"created_at": "2023-12-14T15:50:21.799Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"source": "api",
"folder_id": 1,
"folder_name": "Default",
"external_id": "f0b4714f-e44b-4993-905b-68b4451eef8c",
"author": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"documents": [
{
"id": 3,
"uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5",
"url": "https://docuseal.com/file/hash/Test%20Template.pdf"
}
]
}
}
}
}
}
}
},
"/templates/{id}/clone": {
"post": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Templates"
],
"summary": "Clone a template",
"description": "The API endpoint allows you to clone an existing template into a new template.",
"operationId": "cloneTemplate",
"parameters": [
{
"name": "id",
"in": "path",
"required": true,
"schema": {
"type": "integer"
},
"description": "The unique identifier of the document template.",
"example": 1000001
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Template name. Existing name with (Clone) suffix will be used if not specified.",
"examples": [
"Cloned Template"
]
},
"folder_name": {
"type": "string",
"description": "The folder's name to which the template should be cloned."
},
"external_id": {
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"slug",
"name",
"preferences",
"schema",
"fields",
"submitters",
"author_id",
"archived_at",
"created_at",
"updated_at",
"source",
"external_id",
"folder_id",
"folder_name",
"author",
"documents"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"slug": {
"type": "string",
"description": "Unique slug of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"preferences": {
"type": "object",
"description": "Template preferences."
},
"schema": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"attachment_uuid",
"name"
],
"properties": {
"attachment_uuid": {
"type": "string",
"description": "Unique identifier of attached document to the template."
},
"name": {
"type": "string",
"description": "Name of the attached document to the template."
}
}
}
},
"fields": {
"type": "array",
"description": "List of fields to be filled in the template.",
"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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"submitters": {
"type": "array",
"description": "The list of submitters for the template.",
"items": {
"type": "object",
"required": [
"name",
"uuid"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the submitter."
}
}
}
},
"author_id": {
"type": "integer",
"description": "Unique identifier of the author of the template."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the template was archived."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
},
"source": {
"type": "string",
"description": "Source of the template.",
"enum": [
"native",
"api",
"embed"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this template within your app."
},
"folder_id": {
"type": "integer",
"description": "Unique identifier of the folder where the template is located."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is located."
},
"shared_link": {
"type": "boolean",
"description": "Indicates if the template is accessible by link."
},
"author": {
"type": "object",
"required": [
"id",
"first_name",
"last_name",
"email"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the author."
},
"first_name": {
"type": "string",
"description": "First name of the author."
},
"last_name": {
"type": "string",
"description": "Last name of the author."
},
"email": {
"type": "string",
"description": "Author email."
}
}
},
"documents": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"id",
"uuid",
"url",
"preview_image_url",
"filename"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the document."
},
"url": {
"type": "string",
"description": "URL of the document."
},
"preview_image_url": {
"type": "string",
"description": "Document preview image URL."
},
"filename": {
"type": "string",
"description": "Document filename."
}
}
}
}
}
},
"example": {
"id": 6,
"slug": "Xc7opTqwwV9P7x",
"name": "Cloned Template",
"schema": [
{
"attachment_uuid": "68aa0716-61f0-4535-9ba4-6c00f835b080",
"name": "sample-document"
}
],
"fields": [
{
"uuid": "93c7065b-1b19-4551-b67b-9946bf1c11c9",
"submitter_uuid": "ad128012-756d-4d17-b728-6f6b1d482bb5",
"name": "Name",
"type": "text",
"required": true,
"areas": [
{
"page": 0,
"attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5",
"x": 0.403158189124654,
"y": 0.04211750189825361,
"w": 0.100684625476058,
"h": 0.01423690205011389
}
]
}
],
"submitters": [
{
"name": "First Party",
"uuid": "ad128012-756d-4d17-b728-6f6b1d482bb5"
}
],
"author_id": 1,
"archived_at": null,
"created_at": "2023-12-14T15:50:21.799Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"source": "api",
"folder_id": 2,
"folder_name": "Default",
"external_id": null,
"shared_link": true,
"author": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"documents": [
{
"id": 9,
"uuid": "ded62277-9705-4fac-b5dc-58325d4102eb",
"url": "https://docuseal.com/file/hash/sample-document.pdf",
"filename": "sample-document.pdf"
}
]
}
}
}
}
}
}
},
"/templates/html": {
"post": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Templates"
],
"summary": "Create a template from HTML",
"description": "The API endpoint provides the functionality to seamlessly generate a PDF document template by utilizing the provided HTML content while incorporating pre-defined fields.<br><b>Related Guides</b><br><a href=\"https://www.docuseal.com/guides/create-pdf-document-fillable-form-with-html-api\" class=\"link\">Create PDF document fillable form with HTML</a>",
"operationId": "createTemplateFromHtml",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"html"
],
"properties": {
"html": {
"type": "string",
"description": "HTML template with field tags.",
"examples": [
"<p>Lorem Ipsum is simply dummy text of the\n<text-field\n name=\"Industry\"\n role=\"First Party\"\n required=\"false\"\n style=\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\">\n</text-field>\nand typesetting industry</p>\n"
]
},
"html_header": {
"type": "string",
"description": "HTML template of the header to be displayed on every page."
},
"html_footer": {
"type": "string",
"description": "HTML template of the footer to be displayed on every page."
},
"name": {
"type": "string",
"description": "Template name. Random uuid will be assigned when not specified.",
"examples": [
"Test Template"
]
},
"size": {
"type": "string",
"default": "Letter",
"description": "Page size. Letter 8.5 x 11 will be assigned when not specified.",
"enum": [
"Letter",
"Legal",
"Tabloid",
"Ledger",
"A0",
"A1",
"A2",
"A3",
"A4",
"A5",
"A6"
],
"examples": [
"A4"
]
},
"external_id": {
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new HTML.",
"examples": [
"714d974e-83d8-11ee-b962-0242ac120002"
]
},
"folder_name": {
"type": "string",
"description": "The folder's name in which the template should be created."
},
"shared_link": {
"type": "boolean",
"description": "Set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
"default": true
},
"documents": {
"type": "array",
"description": "The list of documents built from HTML. Can be used to create a template with multiple documents. Leave `documents` param empty when using a top-level `html` param for a template with a single document.",
"items": {
"type": "object",
"required": [
"html"
],
"properties": {
"html": {
"type": "string",
"description": "HTML template with field tags.",
"examples": [
"<p>Lorem Ipsum is simply dummy text of the\n<text-field\n name=\"Industry\"\n role=\"First Party\"\n required=\"false\"\n style=\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\">\n</text-field>\nand typesetting industry</p>\n"
]
},
"name": {
"type": "string",
"description": "Document name. Random uuid will be assigned when not specified.",
"examples": [
"Test Document"
]
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"slug",
"name",
"preferences",
"schema",
"fields",
"submitters",
"author_id",
"archived_at",
"created_at",
"updated_at",
"source",
"external_id",
"folder_id",
"folder_name",
"author",
"documents"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"slug": {
"type": "string",
"description": "Unique slug of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"preferences": {
"type": "object",
"description": "Template preferences."
},
"schema": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"attachment_uuid",
"name"
],
"properties": {
"attachment_uuid": {
"type": "string",
"description": "Unique identifier of attached document to the template."
},
"name": {
"type": "string",
"description": "Name of the attached document to the template."
}
}
}
},
"fields": {
"type": "array",
"description": "List of fields to be filled in the template.",
"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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"submitters": {
"type": "array",
"description": "The list of submitters for the template.",
"items": {
"type": "object",
"required": [
"name",
"uuid"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the submitter."
}
}
}
},
"author_id": {
"type": "integer",
"description": "Unique identifier of the author of the template."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the template was archived."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
},
"source": {
"type": "string",
"description": "Source of the template.",
"enum": [
"native",
"api",
"embed"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this template within your app."
},
"folder_id": {
"type": "integer",
"description": "Unique identifier of the folder where the template is located."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is located."
},
"shared_link": {
"type": "boolean",
"description": "Indicates if the template is accessible by link."
},
"author": {
"type": "object",
"required": [
"id",
"first_name",
"last_name",
"email"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the author."
},
"first_name": {
"type": "string",
"description": "First name of the author."
},
"last_name": {
"type": "string",
"description": "Last name of the author."
},
"email": {
"type": "string",
"description": "Author email."
}
}
},
"documents": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"id",
"uuid",
"url",
"preview_image_url",
"filename"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the document."
},
"url": {
"type": "string",
"description": "URL of the document."
},
"preview_image_url": {
"type": "string",
"description": "Document preview image URL."
},
"filename": {
"type": "string",
"description": "Document filename."
}
}
}
}
}
},
"example": {
"id": 3,
"slug": "ZQpF222rFBv71q",
"name": "Demo Template",
"schema": [
{
"name": "Demo Template",
"attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5"
}
],
"fields": [
{
"name": "Name",
"required": false,
"type": "text",
"uuid": "a06c49f6-4b20-4442-ac7f-c1040d2cf1ac",
"submitter_uuid": "93ba628c-5913-4456-a1e9-1a81ad7444b3",
"areas": [
{
"page": 0,
"attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5",
"x": 0.403158189124654,
"y": 0.04211750189825361,
"w": 0.100684625476058,
"h": 0.01423690205011389
}
]
}
],
"submitters": [
{
"name": "Submitter",
"uuid": "93ba628c-5913-4456-a1e9-1a81ad7444b3"
}
],
"author_id": 1,
"archived_at": null,
"created_at": "2023-12-14T15:50:21.799Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"source": "api",
"folder_id": 1,
"folder_name": "Default",
"external_id": "f0b4714f-e44b-4993-905b-68b4451eef8c",
"shared_link": true,
"author": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"documents": [
{
"id": 3,
"uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5",
"url": "https://docuseal.com/file/hash/Test%20Template.pdf"
}
]
}
}
}
}
}
}
},
"/templates/docx": {
"post": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Templates"
],
"summary": "Create a template from Word DOCX",
"description": "The API endpoint provides the functionality to create a fillable document template for an existing Microsoft Word document. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href=\"https://www.docuseal.com/examples/fieldtags.docx\" target=\"_blank\" class=\"link font-bold\" >https://www.docuseal.com/examples/fieldtags.docx</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href=\"https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form\" class=\"link\">Use embedded text field tags to create a fillable form</a>\n",
"operationId": "createTemplateFromDocx",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"documents"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the template.",
"examples": [
"Test DOCX"
]
},
"external_id": {
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app. Existing template with specified `external_id` will be updated with a new document.",
"examples": [
"unique-key"
]
},
"folder_name": {
"type": "string",
"description": "The folder's name in 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": "An array of DOCX documents to create a template.",
"items": {
"type": "object",
"required": [
"name",
"file"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the document."
},
"file": {
"type": "string",
"examples": [
"base64"
],
"format": "base64",
"description": "Base64-encoded content of the DOCX file or downloadable file URL."
},
"dynamic": {
"type": "boolean",
"description": "Set to `true` to make the document dynamic. When enabled, the DOCX document content can be edited or use [[variables]] in the template editor.",
"default": false
},
"fields": {
"description": "Fields are optional if you use {{...}} text tags to define fields in the document.",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Name of the field."
},
"type": {
"type": "string",
"description": "Type of the field (e.g., text, signature, date, initials).",
"enum": [
"heading",
"text",
"signature",
"initials",
"date",
"number",
"image",
"checkbox",
"multiple",
"file",
"radio",
"select",
"cells",
"stamp",
"payment",
"phone",
"verification",
"kba",
"strikethrough"
]
},
"role": {
"type": "string",
"description": "Role name of the signer."
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"title": {
"type": "string",
"description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
},
"description": {
"type": "string",
"description": "Field description displayed on the signing form. Supports Markdown."
},
"areas": {
"type": "array",
"description": "List of areas where the field is located in the document.",
"items": {
"type": "object",
"properties": {
"x": {
"type": "number",
"description": "X-coordinate of the field area."
},
"y": {
"type": "number",
"description": "Y-coordinate of the field area."
},
"w": {
"type": "number",
"description": "Width of the field area."
},
"h": {
"type": "number",
"description": "Height of the field area."
},
"page": {
"type": "integer",
"description": "Page number of the field area. Starts from 1."
},
"option": {
"type": "string",
"description": "Option string value for 'radio' and 'multiple' select field types."
}
}
}
},
"options": {
"type": "array",
"description": "An array of option values for 'select' field type.",
"items": {
"type": "string"
},
"examples": [
[
"Option A",
"Option B"
]
]
},
"validation": {
"type": "object",
"description": "Field validation rules.",
"properties": {
"pattern": {
"type": "string",
"description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
"examples": [
"[A-Z]{4}"
]
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"properties": {
"font_size": {
"type": "integer",
"description": "Font size of the field value in pixels.",
"examples": [
12
]
},
"font_type": {
"type": "string",
"description": "Font type of the field value.",
"enum": [
"bold",
"italic",
"bold_italic"
]
},
"font": {
"type": "string",
"description": "Font family of the field value.",
"enum": [
"Times",
"Helvetica",
"Courier"
]
},
"color": {
"type": "string",
"description": "Font color of the field value.",
"enum": [
"black",
"white",
"blue"
],
"default": "black"
},
"background": {
"type": "string",
"description": "Field box background color.",
"enum": [
"black",
"white",
"blue"
]
},
"align": {
"type": "string",
"description": "Horizontal alignment of the field text value.",
"enum": [
"left",
"center",
"right"
],
"default": "left"
},
"valign": {
"type": "string",
"description": "Vertical alignment of the field text value.",
"enum": [
"top",
"center",
"bottom"
],
"default": "center"
},
"format": {
"type": "string",
"description": "The data format for different field types.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- Number field: accepts currency formats such as usd, eur, gbp.",
"examples": [
"DD/MM/YYYY"
]
},
"price": {
"type": "number",
"description": "Price value of the payment field. Only for payment fields.",
"examples": [
99.99
]
},
"currency": {
"type": "string",
"description": "Currency value of the payment field. Only for payment fields.",
"enum": [
"USD",
"EUR",
"GBP",
"CAD",
"AUD"
],
"default": "USD"
},
"mask": {
"description": "Set `true` to make sensitive data masked on the document.",
"oneOf": [
{
"type": "integer"
},
{
"type": "boolean"
}
],
"default": false
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"slug",
"name",
"preferences",
"schema",
"fields",
"submitters",
"author_id",
"archived_at",
"created_at",
"updated_at",
"source",
"external_id",
"folder_id",
"folder_name",
"author",
"documents"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"slug": {
"type": "string",
"description": "Unique slug of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"preferences": {
"type": "object",
"description": "Template preferences."
},
"schema": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"attachment_uuid",
"name"
],
"properties": {
"attachment_uuid": {
"type": "string",
"description": "Unique identifier of attached document to the template."
},
"name": {
"type": "string",
"description": "Name of the attached document to the template."
}
}
}
},
"fields": {
"type": "array",
"description": "List of fields to be filled in the template.",
"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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"submitters": {
"type": "array",
"description": "The list of submitters for the template.",
"items": {
"type": "object",
"required": [
"name",
"uuid"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the submitter."
}
}
}
},
"author_id": {
"type": "integer",
"description": "Unique identifier of the author of the template."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the template was archived."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
},
"source": {
"type": "string",
"description": "Source of the template.",
"enum": [
"native",
"api",
"embed"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this template within your app."
},
"folder_id": {
"type": "integer",
"description": "Unique identifier of the folder where the template is located."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is located."
},
"shared_link": {
"type": "boolean",
"description": "Indicates if the template is accessible by link."
},
"author": {
"type": "object",
"required": [
"id",
"first_name",
"last_name",
"email"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the author."
},
"first_name": {
"type": "string",
"description": "First name of the author."
},
"last_name": {
"type": "string",
"description": "Last name of the author."
},
"email": {
"type": "string",
"description": "Author email."
}
}
},
"documents": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"id",
"uuid",
"url",
"preview_image_url",
"filename"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the document."
},
"url": {
"type": "string",
"description": "URL of the document."
},
"preview_image_url": {
"type": "string",
"description": "Document preview image URL."
},
"filename": {
"type": "string",
"description": "Document filename."
}
}
}
}
}
},
"example": {
"id": 5,
"slug": "s3ff992CoPjvaX",
"name": "Demo PDF",
"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
}
]
}
],
"submitters": [
{
"name": "Submitter",
"uuid": "0b0bff58-bc9a-475d-b4a9-2f3e5323faf7"
}
],
"author_id": 1,
"archived_at": null,
"created_at": "2023-12-14T15:50:21.799Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"source": "api",
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
"shared_link": true,
"author": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"documents": [
{
"id": 7,
"uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf",
"url": "https://docuseal.com/hash/DemoPDF.pdf"
}
]
}
}
}
}
}
}
},
"/templates/pdf": {
"post": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Templates"
],
"summary": "Create a template from PDF",
"description": "The API endpoint provides the functionality to create a fillable document template for a PDF file. Use <code>{{Field Name;role=Signer1;type=date}}</code> text tags to define fillable fields in the document. See <a href=\"https://www.docuseal.com/examples/fieldtags.pdf\" target=\"_blank\" class=\"link font-bold\">https://www.docuseal.com/examples/fieldtags.pdf</a> for more text tag formats. Or specify the exact pixel coordinates of the document fields using `fields` param.<br><b>Related Guides</b><br><a href=\"https://www.docuseal.com/guides/use-embedded-text-field-tags-in-the-pdf-to-create-a-fillable-form\" class=\"link\">Use embedded text field tags to create a fillable form</a>\n",
"operationId": "createTemplateFromPdf",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"documents"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the template.",
"examples": [
"Test PDF"
]
},
"folder_name": {
"type": "string",
"description": "The folder's name in 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.",
"examples": [
"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",
"description": "An array of PDF documents to create a template.",
"items": {
"type": "object",
"required": [
"name",
"file"
],
"properties": {
"name": {
"type": "string",
"description": "Name of the document."
},
"file": {
"examples": [
"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",
"kba",
"strikethrough"
]
},
"role": {
"type": "string",
"description": "Role name of the signer."
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"title": {
"type": "string",
"description": "Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."
},
"description": {
"type": "string",
"description": "Field description displayed on the signing form. Supports Markdown."
},
"areas": {
"type": "array",
"description": "List of areas where the field is located in the document.",
"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.",
"examples": [
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"
},
"examples": [
[
"Option A",
"Option B"
]
]
},
"validation": {
"type": "object",
"description": "Field validation rules.",
"properties": {
"pattern": {
"type": "string",
"description": "HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.",
"examples": [
"[A-Z]{4}"
]
},
"message": {
"type": "string",
"description": "A custom error message to display on validation failure."
},
"min": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Minimum allowed number value or date depending on field type."
},
"max": {
"oneOf": [
{
"type": "number"
},
{
"type": "string"
}
],
"description": "Maximum allowed number value or date depending on field type."
},
"step": {
"type": "number",
"description": "Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."
}
}
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"properties": {
"font_size": {
"type": "integer",
"description": "Font size of the field value in pixels.",
"examples": [
12
]
},
"font_type": {
"type": "string",
"description": "Font type of the field value.",
"enum": [
"bold",
"italic",
"bold_italic"
]
},
"font": {
"type": "string",
"description": "Font family of the field value.",
"enum": [
"Times",
"Helvetica",
"Courier"
]
},
"color": {
"type": "string",
"description": "Font color of the field value.",
"enum": [
"black",
"white",
"blue"
],
"default": "black"
},
"background": {
"type": "string",
"description": "Field box background color.",
"enum": [
"black",
"white",
"blue"
]
},
"align": {
"type": "string",
"description": "Horizontal alignment of the field text value.",
"enum": [
"left",
"center",
"right"
],
"default": "left"
},
"valign": {
"type": "string",
"description": "Vertical alignment of the field text value.",
"enum": [
"top",
"center",
"bottom"
],
"default": "center"
},
"format": {
"type": "string",
"description": "The data format for different field types.<br>- Date field: accepts formats such as DD/MM/YYYY (default: MM/DD/YYYY).<br>- Signature field: accepts drawn, typed, drawn_or_typed (default), or upload.<br>- Number field: accepts currency formats such as usd, eur, gbp.",
"examples": [
"DD/MM/YYYY"
]
},
"price": {
"type": "number",
"description": "Price value of the payment field. Only for payment fields.",
"examples": [
99.99
]
},
"currency": {
"type": "string",
"description": "Currency value of the payment field. Only for payment fields.",
"enum": [
"USD",
"EUR",
"GBP",
"CAD",
"AUD"
],
"default": "USD"
},
"mask": {
"description": "Set `true` to make sensitive data masked on the document.",
"oneOf": [
{
"type": "integer"
},
{
"type": "boolean"
}
],
"default": false
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
}
}
}
}
},
"flatten": {
"type": "boolean",
"description": "Remove PDF form fields from the documents.",
"default": false
},
"remove_tags": {
"type": "boolean",
"description": "Pass `false` to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.",
"default": true
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"slug",
"name",
"preferences",
"schema",
"fields",
"submitters",
"author_id",
"archived_at",
"created_at",
"updated_at",
"source",
"external_id",
"folder_id",
"folder_name",
"author",
"documents"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"slug": {
"type": "string",
"description": "Unique slug of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"preferences": {
"type": "object",
"description": "Template preferences."
},
"schema": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"attachment_uuid",
"name"
],
"properties": {
"attachment_uuid": {
"type": "string",
"description": "Unique identifier of attached document to the template."
},
"name": {
"type": "string",
"description": "Name of the attached document to the template."
}
}
}
},
"fields": {
"type": "array",
"description": "List of fields to be filled in the template.",
"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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"submitters": {
"type": "array",
"description": "The list of submitters for the template.",
"items": {
"type": "object",
"required": [
"name",
"uuid"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the submitter."
}
}
}
},
"author_id": {
"type": "integer",
"description": "Unique identifier of the author of the template."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the template was archived."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
},
"source": {
"type": "string",
"description": "Source of the template.",
"enum": [
"native",
"api",
"embed"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this template within your app."
},
"folder_id": {
"type": "integer",
"description": "Unique identifier of the folder where the template is located."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is located."
},
"shared_link": {
"type": "boolean",
"description": "Indicates if the template is accessible by link."
},
"author": {
"type": "object",
"required": [
"id",
"first_name",
"last_name",
"email"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the author."
},
"first_name": {
"type": "string",
"description": "First name of the author."
},
"last_name": {
"type": "string",
"description": "Last name of the author."
},
"email": {
"type": "string",
"description": "Author email."
}
}
},
"documents": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"id",
"uuid",
"url",
"preview_image_url",
"filename"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the document."
},
"url": {
"type": "string",
"description": "URL of the document."
},
"preview_image_url": {
"type": "string",
"description": "Document preview image URL."
},
"filename": {
"type": "string",
"description": "Document filename."
}
}
}
}
}
},
"example": {
"id": 5,
"slug": "s3ff992CoPjvaX",
"name": "Demo PDF",
"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
}
]
}
],
"submitters": [
{
"name": "Submitter",
"uuid": "0b0bff58-bc9a-475d-b4a9-2f3e5323faf7"
}
],
"author_id": 1,
"archived_at": null,
"created_at": "2023-12-14T15:50:21.799Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"source": "api",
"folder_id": 1,
"folder_name": "Default",
"external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5",
"shared_link": true,
"author": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"documents": [
{
"id": 7,
"uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf",
"url": "https://docuseal.com/file/hash/Demo%20PDF.pdf"
}
]
}
}
}
}
}
}
},
"/templates/merge": {
"post": {
"security": [
{
"AuthToken": []
}
],
"tags": [
"Templates"
],
"summary": "Merge templates",
"description": "The API endpoint allows you to merge multiple templates with documents and fields into a new combined template.",
"operationId": "mergeTemplate",
"parameters": [],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"template_ids"
],
"properties": {
"template_ids": {
"type": "array",
"description": "An array of template ids to merge into a new template.",
"items": {
"type": "integer"
},
"examples": [
[
321,
432
]
]
},
"name": {
"type": "string",
"description": "Template name. Existing name with (Merged) suffix will be used if not specified.",
"examples": [
"Merged Template"
]
},
"folder_name": {
"type": "string",
"description": "The name of the folder in which the merged template should be placed."
},
"external_id": {
"type": "string",
"description": "Your application-specific unique string key to identify this template within your app."
},
"shared_link": {
"type": "boolean",
"description": "Set to `true` to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.",
"default": true
},
"roles": {
"type": "array",
"description": "An array of submitter role names to be used in the merged template.",
"items": {
"type": "string"
},
"examples": [
[
"Agent",
"Customer"
]
]
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"required": [
"id",
"slug",
"name",
"preferences",
"schema",
"fields",
"submitters",
"author_id",
"archived_at",
"created_at",
"updated_at",
"source",
"external_id",
"folder_id",
"folder_name",
"author",
"documents"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document template."
},
"slug": {
"type": "string",
"description": "Unique slug of the document template."
},
"name": {
"type": "string",
"description": "The name of the template."
},
"preferences": {
"type": "object",
"description": "Template preferences."
},
"schema": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"attachment_uuid",
"name"
],
"properties": {
"attachment_uuid": {
"type": "string",
"description": "Unique identifier of attached document to the template."
},
"name": {
"type": "string",
"description": "Name of the attached document to the template."
}
}
}
},
"fields": {
"type": "array",
"description": "List of fields to be filled in the template.",
"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",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "Indicates if the field is required."
},
"preferences": {
"type": "object",
"description": "Field display preferences.",
"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."
},
"background": {
"type": "string",
"description": "Field box background color."
},
"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."
},
"reasons": {
"description": "An array of signature reasons to choose from.",
"type": "array",
"items": {
"type": "string"
}
}
}
},
"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."
}
}
}
}
}
}
},
"submitters": {
"type": "array",
"description": "The list of submitters for the template.",
"items": {
"type": "object",
"required": [
"name",
"uuid"
],
"properties": {
"name": {
"type": "string",
"description": "The name of the submitter."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the submitter."
}
}
}
},
"author_id": {
"type": "integer",
"description": "Unique identifier of the author of the template."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the template was archived."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
},
"source": {
"type": "string",
"description": "Source of the template.",
"enum": [
"native",
"api",
"embed"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this template within your app."
},
"folder_id": {
"type": "integer",
"description": "Unique identifier of the folder where the template is located."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is located."
},
"shared_link": {
"type": "boolean",
"description": "Indicates if the template is accessible by link."
},
"author": {
"type": "object",
"required": [
"id",
"first_name",
"last_name",
"email"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the author."
},
"first_name": {
"type": "string",
"description": "First name of the author."
},
"last_name": {
"type": "string",
"description": "Last name of the author."
},
"email": {
"type": "string",
"description": "Author email."
}
}
},
"documents": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"required": [
"id",
"uuid",
"url",
"preview_image_url",
"filename"
],
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the document."
},
"url": {
"type": "string",
"description": "URL of the document."
},
"preview_image_url": {
"type": "string",
"description": "Document preview image URL."
},
"filename": {
"type": "string",
"description": "Document filename."
}
}
}
}
}
},
"example": {
"id": 6,
"slug": "Xc7opTqwwV9P7x",
"name": "Merged Template",
"schema": [
{
"attachment_uuid": "68aa0716-61f0-4535-9ba4-6c00f835b080",
"name": "sample-document"
}
],
"fields": [
{
"uuid": "93c7065b-1b19-4551-b67b-9946bf1c11c9",
"submitter_uuid": "ad128012-756d-4d17-b728-6f6b1d482bb5",
"name": "Name",
"type": "text",
"required": true,
"areas": [
{
"page": 0,
"attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5",
"x": 0.403158189124654,
"y": 0.04211750189825361,
"w": 0.100684625476058,
"h": 0.01423690205011389
}
]
}
],
"submitters": [
{
"name": "First Party",
"uuid": "ad128012-756d-4d17-b728-6f6b1d482bb5"
}
],
"author_id": 1,
"archived_at": null,
"created_at": "2023-12-14T15:50:21.799Z",
"updated_at": "2023-12-14T15:50:21.799Z",
"source": "api",
"folder_id": 2,
"folder_name": "Default",
"external_id": null,
"shared_link": true,
"author": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"documents": [
{
"id": 9,
"uuid": "ded62277-9705-4fac-b5dc-58325d4102eb",
"url": "https://docuseal.com/file/hash/sample-document.pdf",
"filename": "sample-document.pdf"
}
]
}
}
}
}
}
}
}
},
"webhooks": {
"formWebhook": {
"post": {
"summary": "Form Webhook",
"description": "During the form filling and signing process, 4 types of events may occur and are dispatched at different stages: <ul><li><strong>'form.viewed'</strong> event is triggered when the submitter first opens the form.</li><li><strong>'form.started'</strong> event is triggered when the submitter initiates filling out the form.</li><li><strong>'form.completed'</strong> event is triggered upon successful form completion and signing by one of the parties.</li><li><strong>'form.declined'</strong> event is triggered when a signer declines the submission.</li></ul> It's important to note that each of these events contain information available at the time of dispatch, so some data may be missing or incomplete depending on the specific event. Failed webhook requests (4xx, 5xx) are automatically retried multiple times within 48 hours (every 2^attempt minutes) for all production accounts.<br><b>Related Guides</b><br><a href=\"https://www.docuseal.com/guides/download-signed-documents\" class=\"link\">Download Signed Documents</a>",
"operationId": "formWebhook",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"event_type": {
"type": "string",
"description": "The event type.",
"enum": [
"form.viewed",
"form.started",
"form.completed",
"form.declined"
]
},
"timestamp": {
"type": "string",
"description": "The event timestamp.",
"examples": [
"2023-09-24T11:20:42Z"
],
"format": "date-time"
},
"data": {
"type": "object",
"description": "Submitted data object.",
"properties": {
"id": {
"type": "number",
"description": "The submitter's unique identifier."
},
"email": {
"type": "string",
"description": "The submitter's email address",
"format": "email",
"examples": [
"john.doe@example.com"
]
},
"ua": {
"type": "string",
"description": "The user agent string that provides information about the submitter's web browser.",
"examples": [
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36"
]
},
"ip": {
"type": "string",
"description": "The submitter's IP address."
},
"name": {
"type": "string",
"description": "The submitter's name."
},
"phone": {
"type": "string",
"description": "The submitter's phone number, formatted according to the E.164 standard.",
"examples": [
"+1234567890"
]
},
"role": {
"type": "string",
"description": "The submitter's role name or title.",
"examples": [
"First Party"
]
},
"external_id": {
"type": "string",
"description": "Your application-specific unique string key to identify submitter within your app."
},
"decline_reason": {
"type": "string",
"description": "Submitter provided decline message."
},
"sent_at": {
"type": "string",
"description": "The date and time when the signing request was sent to the submitter.",
"format": "date-time"
},
"status": {
"type": "string",
"description": "The submitter status.",
"enum": [
"completed",
"declined",
"opened",
"sent",
"awaiting"
]
},
"opened_at": {
"type": "string",
"description": "The date and time when the submitter opened the signing form.",
"format": "date-time"
},
"completed_at": {
"type": "string",
"description": "The date and time when the submitter completed the signing form.",
"format": "date-time"
},
"declined_at": {
"type": "string",
"description": "The date and time when the submitter declined the signing form.",
"format": "date-time"
},
"created_at": {
"type": "string",
"description": "The date and time when the submitter was created.",
"format": "date-time"
},
"updated_at": {
"type": "string",
"description": "The date and time when the submitter was last updated.",
"format": "date-time"
},
"submission": {
"type": "object",
"description": "The submission details.",
"properties": {
"id": {
"type": "number",
"description": "The submission's unique identifier."
},
"audit_log_url": {
"type": "string",
"description": "The audit log PDF URL. Available only if the submission was completed by all submitters."
},
"combined_document_url": {
"type": "string",
"description": "The URL of the combined documents with audit log. Combined documents can be enabled via <a href=\"https://docuseal.com/settings/account\" target=\"_blank\" class=\"link\">/settings/accounts</a>."
},
"status": {
"type": "string",
"description": "The submission status.",
"enum": [
"completed",
"declined",
"expired",
"pending"
]
},
"url": {
"type": "string",
"description": "The submission URL."
},
"variables": {
"type": "object",
"description": "Dynamic content variables object."
},
"created_at": {
"type": "string",
"description": "The submission creation date.",
"format": "date-time"
}
}
},
"template": {
"type": "object",
"description": "Base template details.",
"properties": {
"id": {
"type": "number",
"description": "The template's unique identifier."
},
"name": {
"type": "string",
"description": "The template's name."
},
"external_id": {
"type": "string",
"description": "Your application-specific unique string key to identify template within your app."
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"folder_name": {
"type": "string",
"description": "Template folder name."
}
}
},
"preferences": {
"type": "object",
"description": "Submitter preferences for notifications.",
"properties": {
"send_email": {
"type": "boolean",
"description": "The flag indicating whether the submitter has opted to receive an email."
},
"send_sms": {
"type": "boolean",
"description": "The flag indicating whether the submitter has opted to receive an SMS."
}
}
},
"values": {
"type": "array",
"description": "List of the filled values passed by the submitter.",
"items": {
"type": "object",
"properties": {
"field": {
"type": "string",
"description": "The field name."
},
"value": {
"type": "string",
"description": "The field value."
}
}
}
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information."
},
"audit_log_url": {
"type": "string",
"description": "The audit log PDF URL. Available only if the submission was completed by all submitters."
},
"submission_url": {
"type": "string",
"description": "The submission URL."
},
"documents": {
"type": "array",
"description": "List of completed documents signed by the submitter.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The document file name."
},
"url": {
"type": "string",
"description": "The document file URL."
}
}
}
}
}
}
}
},
"example": {
"event_type": "form.completed",
"timestamp": "2023-09-24T13:48:36Z",
"data": {
"id": 1,
"email": "john.doe@example.com",
"ua": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36",
"ip": "132.216.88.83",
"sent_at": "2023-08-20T10:09:05.459Z",
"opened_at": "2023-08-20T10:10:00.451Z",
"completed_at": "2023-08-20T10:12:47.579Z",
"declined_at": null,
"created_at": "2023-08-20T10:09:02.459Z",
"updated_at": "2023-08-20T10:12:47.907Z",
"name": null,
"phone": null,
"role": "First Party",
"external_id": null,
"decline_reason": null,
"status": "completed",
"preferences": {
"send_email": true,
"send_sms": false
},
"submission": {
"id": 12,
"audit_log_url": "https://docuseal.com/blobs/proxy/eyJfcmFpbHMiOnsib/audit-log.pdf",
"combined_document_url": "https://docuseal.com/blobs/proxy/eyJfcmFpbHMiOnsib/document.pdf",
"status": "completed",
"url": "https://docuseal.com/e/N5JsdkFGPeQF7J",
"variables": {
"custom_variable": "value"
},
"created_at": "2023-08-20T10:09:05.258Z"
},
"template": {
"id": 6,
"name": "Invoice",
"external_id": null,
"created_at": "2023-08-19T11:09:21.487Z",
"updated_at": "2023-08-19T11:11:47.804Z",
"folder_name": "Default"
},
"values": [
{
"field": "First Name",
"value": "John"
},
{
"field": "Last Name",
"value": "Doe"
},
{
"field": "Signature",
"value": "https://docuseal.com/blobs/proxy/eyJfcmFpbHMiOnsib/signature.png"
},
{
"field": "Signature",
"value": "John Doe"
}
],
"metadata": {
"customData": "custom value"
},
"audit_log_url": "https://docuseal.com/blobs/proxy/eyJfcmFpbHMiOnsib/audit-log.pdf",
"submission_url": "https://docuseal.com/e/N5JsdkFGPeQF7J",
"documents": [
{
"name": "sample-document",
"url": "https://docuseal.com/blobs/proxy/eyJfcmFpbHMiOnsib/sample-document.pdf"
}
]
}
}
}
}
},
"responses": {
"200": {
"description": "Return a 200 response to acknowledge successful receipt of the webhook event."
}
}
}
},
"submissionWebhook": {
"post": {
"summary": "Submission Webhook",
"description": "Get submission creation, completion, expiration, and archiving notifications using these events: <ul><li><strong>'submission.created'</strong> event is triggered when the submission is created.</li><li><strong>'submission.completed'</strong> event is triggered when the submission is completed by all signing parties.</li><li><strong>'submission.expired'</strong> event is triggered when the submission expires.</li><li><strong>'submission.archived'</strong> event is triggered when the submission is archived.</li> </ul>",
"operationId": "submissionWebhook",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"event_type": {
"type": "string",
"description": "The event type.",
"enum": [
"submission.created",
"submission.completed",
"submission.expired",
"submission.archived"
]
},
"timestamp": {
"type": "string",
"description": "The event timestamp.",
"examples": [
"2023-09-24T11:20:42Z"
],
"format": "date-time"
},
"data": {
"type": "object",
"description": "Submitted data object.",
"properties": {
"id": {
"type": "number",
"description": "The submission's unique identifier."
},
"name": {
"type": "string",
"description": "Name of the document submission."
},
"slug": {
"type": "string",
"description": "Unique slug of the submission."
},
"expire_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submission will expire."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "The submission archive date."
},
"created_at": {
"type": "string",
"description": "The submission creation date."
},
"updated_at": {
"type": "string",
"description": "The submission update date."
},
"source": {
"type": "string",
"description": "The submission source.",
"enum": [
"invite",
"bulk",
"api",
"embed",
"link"
]
},
"submitters_order": {
"type": "string",
"description": "The submitters order.",
"enum": [
"random",
"preserved"
]
},
"audit_log_url": {
"type": [
"string",
"null"
],
"description": "Audit log file URL."
},
"combined_document_url": {
"type": [
"string",
"null"
],
"description": "Combined PDF file URL with documents and Audit Log."
},
"submitters": {
"type": "array",
"description": "The list of submitters for the submission.",
"items": {
"type": "object",
"properties": {
"id": {
"type": "number",
"description": "The submitter's unique identifier."
},
"submission_id": {
"type": "number",
"description": "The unique submission identifier."
},
"uuid": {
"type": "string",
"description": "The submitter UUID."
},
"email": {
"type": "string",
"description": "The email address of the submitter.",
"format": "email",
"examples": [
"john.doe@example.com"
]
},
"slug": {
"type": "string",
"description": "The unique slug of the document template."
},
"sent_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the signing request was sent to the submitter."
},
"opened_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter opened the signing form."
},
"completed_at": {
"type": [
"string",
"null"
],
"description": "The date and time when the submitter completed the signing form."
},
"declined_at": {
"type": [
"string",
"null"
],
"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",
"null"
],
"description": "The name of the submitter."
},
"phone": {
"type": [
"string",
"null"
],
"description": "The phone number of the submitter, formatted according to the E.164 standard.",
"examples": [
"+1234567890"
]
},
"role": {
"type": "string",
"description": "The role name or title of the submitter.",
"examples": [
"First Party"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Your application-specific unique string key to identify this submitter within your app."
},
"metadata": {
"type": "object",
"description": "Metadata object with additional submitter information.",
"examples": [
"{ 'customField': 'value' }"
]
},
"status": {
"type": "string",
"description": "The submitter status.",
"enum": [
"completed",
"declined",
"opened",
"sent",
"awaiting"
]
},
"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."
},
"documents": {
"type": "array",
"description": "The list of documents for the submission.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The document file name."
},
"url": {
"type": "string",
"description": "The document file URL."
}
}
}
},
"preferences": {
"type": "object",
"description": "The submitter preferences."
}
}
}
},
"template": {
"type": "object",
"description": "Base template details.",
"properties": {
"id": {
"type": "number",
"description": "The template's unique identifier."
},
"name": {
"type": "string",
"description": "The template's name."
},
"external_id": {
"type": "string",
"description": "Your application-specific unique string key to identify template within your app."
},
"folder_name": {
"type": "string",
"description": "The folder name."
},
"created_at": {
"type": "string",
"description": "The date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "The date and time when the template was last updated."
}
}
},
"variables": {
"type": "object",
"description": "Dynamic content variables object."
},
"created_by_user": {
"type": "object",
"description": "User who created the submission.",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the user who created the submission."
},
"first_name": {
"type": "string",
"description": "The first name of the user who created the submission."
},
"last_name": {
"type": "string",
"description": "The last name of the user who created the submission."
},
"email": {
"type": "string",
"description": "The email address of the user who created the submission."
}
}
},
"submission_events": {
"type": "array",
"description": "List of submission events.",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Submission event unique ID number."
},
"submitter_id": {
"type": "integer",
"description": "Unique identifier of the submitter that triggered the event."
},
"event_type": {
"type": "string",
"description": "Event type.",
"enum": [
"send_email",
"bounce_email",
"complaint_email",
"send_reminder_email",
"send_sms",
"send_2fa_sms",
"open_email",
"click_email",
"click_sms",
"phone_verified",
"start_form",
"start_verification",
"complete_verification",
"view_form",
"invite_party",
"complete_form",
"decline_form",
"api_complete_form"
]
},
"event_timestamp": {
"type": "string",
"description": "Date and time when the event was triggered."
},
"data": {
"type": "object",
"description": "Additional event details object."
}
}
}
},
"documents": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Document name."
},
"url": {
"type": "string",
"description": "Document URL."
}
}
}
},
"status": {
"type": "string",
"description": "The status of the submission.",
"enum": [
"completed",
"declined",
"expired",
"pending"
]
},
"completed_at": {
"type": "string",
"description": "The date and time when the submission was fully completed."
}
}
}
}
},
"example": {
"event_type": "submission.created",
"timestamp": "2024-05-26T17:32:33.518Z",
"data": {
"id": 1,
"name": "Sample Submission",
"slug": "VyL4szTwYoSvXq",
"expire_at": null,
"archived_at": null,
"created_at": "2024-05-26T17:32:33.447Z",
"updated_at": "2024-05-26T17:32:33.447Z",
"source": "invite",
"submitters_order": "random",
"audit_log_url": null,
"combined_document_url": null,
"submitters": [
{
"id": 1,
"submission_id": 1,
"uuid": "6b92a2d0-b511-4678-bccf-1e8a131f5030",
"email": "mike@example.com",
"slug": "S6fWFYRZus6suW",
"sent_at": null,
"opened_at": null,
"completed_at": null,
"declined_at": null,
"created_at": "2024-05-26T17:32:33.466Z",
"updated_at": "2024-05-26T17:32:33.466Z",
"name": null,
"phone": null,
"external_id": null,
"metadata": {},
"status": "awaiting",
"values": [],
"documents": [],
"preferences": {},
"role": "First Party"
}
],
"template": {
"id": 1,
"name": "Sample Document",
"created_at": "2024-05-26T16:57:28.092Z",
"updated_at": "2024-05-26T16:58:07.314Z",
"external_id": null,
"folder_name": "Default"
},
"variables": {
"custom_variable": "value"
},
"created_by_user": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"submission_events": [],
"documents": [],
"status": "pending",
"completed_at": null
}
}
}
}
},
"responses": {
"200": {
"description": "Return a 200 response to acknowledge successful receipt of the webhook event."
}
}
}
},
"templateWebhook": {
"post": {
"summary": "Template Webhook",
"operationId": "templateWebhook",
"description": "Get template creation and update notifications using these events: <ul><li><strong>'template.created'</strong> is triggered when the template is created.</li><li><strong>'template.updated'</strong> is triggered when the template is updated.</li><li><strong>'template.archived'</strong> is triggered when the template is archived.</li></ul>",
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"event_type": {
"type": "string",
"description": "The event type.",
"enum": [
"template.created",
"template.updated",
"template.archived"
]
},
"timestamp": {
"type": "string",
"description": "The event timestamp.",
"examples": [
"2023-09-24T11:20:42Z"
],
"format": "date-time"
},
"data": {
"type": "object",
"description": "Submitted data object.",
"properties": {
"id": {
"type": "number",
"description": "The template's unique identifier."
},
"slug": {
"type": "string",
"description": "The template's unique slug."
},
"name": {
"type": "string",
"description": "The template's name."
},
"schema": {
"type": "array",
"description": "The template 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": "The template fields.",
"items": {
"type": "object",
"properties": {
"uuid": {
"type": "string",
"description": "The field UUID."
},
"submitter_uuid": {
"type": "string",
"description": "The submitter role UUID."
},
"name": {
"type": "string",
"description": "The field name."
},
"type": {
"type": "string",
"description": "The field type.",
"enum": [
"heading",
"text",
"signature",
"initials",
"date",
"number",
"image",
"checkbox",
"multiple",
"file",
"radio",
"select",
"cells",
"stamp",
"payment",
"phone",
"verification",
"kba",
"strikethrough"
]
},
"required": {
"type": "boolean",
"description": "The flag indicating whether the field is required."
},
"preferences": {
"type": "object",
"description": "The field preferences."
},
"areas": {
"type": "array",
"description": "List of areas where the field is located in the document.",
"items": {
"type": "object",
"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."
}
}
}
}
}
}
},
"submitters": {
"type": "array",
"description": "List of submitter roles defined in the template.",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Submitter name."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the submitter."
}
}
}
},
"author_id": {
"type": "integer",
"description": "Unique identifier of the author of the template."
},
"archived_at": {
"type": [
"string",
"null"
],
"description": "Date and time when the template was archived."
},
"created_at": {
"type": "string",
"description": "Date and time when the template was created."
},
"updated_at": {
"type": "string",
"description": "Date and time when the template was updated."
},
"source": {
"type": "string",
"description": "Source of the template.",
"enum": [
"native",
"api",
"embed"
]
},
"external_id": {
"type": [
"string",
"null"
],
"description": "Identifier of the template in the external system."
},
"folder_id": {
"type": "integer",
"description": "Unique identifier of the folder where the template is placed."
},
"folder_name": {
"type": "string",
"description": "Folder name where the template is placed."
},
"preferences": {
"type": "object",
"description": "Template preferences object."
},
"shared_link": {
"type": "boolean",
"description": "Flag indicating whether the shared link is enabled for the template."
},
"author": {
"type": "object",
"description": "Author of the template.",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the author."
},
"first_name": {
"type": "string",
"description": "First name of the author."
},
"last_name": {
"type": "string",
"description": "Last name of the author."
},
"email": {
"type": "string",
"description": "Author email."
}
}
},
"documents": {
"type": "array",
"description": "List of documents attached to the template.",
"items": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"description": "Unique identifier of the document."
},
"uuid": {
"type": "string",
"description": "Unique identifier of the document."
},
"url": {
"type": "string",
"description": "URL of the document."
},
"preview_image_url": {
"type": "string",
"description": "Document preview image URL."
},
"filename": {
"type": "string",
"description": "Document filename."
}
}
}
}
}
}
}
},
"example": {
"event_type": "template.created",
"timestamp": "2024-05-26T16:59:47.237Z",
"data": {
"id": 1,
"slug": "UwRU9ir5dvhSRY",
"name": "Sample Document",
"schema": [
{
"attachment_uuid": "84fa7c01-8b89-47e2-83f0-8623e7e4aa1c",
"name": "sample-document"
}
],
"fields": [
{
"uuid": "f86dbf07-2d84-490c-b372-1aaaaf0549c1",
"submitter_uuid": "6b92a2d0-b511-4678-bccf-1e8a131f5030",
"name": "First Name",
"type": "text",
"required": true,
"preferences": {},
"areas": [
{
"x": 0.2541666666666667,
"y": 0.2266854052667579,
"w": 0.3132975260416667,
"h": 0.04878270348837208,
"attachment_uuid": "84fa7c01-8b89-47e2-83f0-8623e7e4aa1c",
"page": 0
}
]
},
{
"uuid": "1b41711b-f765-41c5-b2b9-000b88b96c6e",
"submitter_uuid": "6b92a2d0-b511-4678-bccf-1e8a131f5030",
"name": "Last Name",
"type": "text",
"required": true,
"preferences": {},
"areas": [
{
"x": 0.5419813368055556,
"y": 0.3057829599863201,
"w": 0.2188802083333333,
"h": 0.05516843365253077,
"attachment_uuid": "84fa7c01-8b89-47e2-83f0-8623e7e4aa1c",
"page": 0
}
]
}
],
"submitters": [
{
"name": "First Party",
"uuid": "6b92a2d0-b511-4678-bccf-1e8a131f5030"
}
],
"author_id": 1,
"archived_at": null,
"created_at": "2024-05-26T16:57:28.092Z",
"updated_at": "2024-05-26T16:57:28.092Z",
"source": "native",
"folder_id": 1,
"external_id": null,
"preferences": {},
"shared_link": false,
"folder_name": "Default",
"author": {
"id": 1,
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@example.com"
},
"documents": [
{
"id": 12,
"uuid": "84fa7c01-8b89-47e2-83f0-8623e7e4aa1c",
"url": "https://docuseal.com/file/hash/sample-document.pdf",
"preview_image_url": "https://docuseal.com/file/hash/0.jpg",
"filename": "sample-document.pdf"
}
]
}
}
}
}
},
"responses": {
"200": {
"description": "Return a 200 response to acknowledge successful receipt of the webhook event."
}
}
}
}
}
}