{"openapi":"3.0.0","servers":[{"url":"https://esigncenter.com/api","description":"EsignCenter API"}],"info":{"version":"1.0.0","title":"EsignCenter API","description":"The EsignCenter REST API: create templates, send documents for signature and read the results from your own code. Authenticate with an X-Auth-Token header; API access is on the paid plan.","contact":{"name":"EsignCenter","url":"https://esigncenter.com/support"}},"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":"Template Builder Sessions","description":"Embedded template builder sessions for CRM-style document workflows."},{"name":"Signing Sessions","description":"Signing Sessions create embeddable signing flows for another application while keeping API tokens on the server side."},{"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. Create one from a PDF or image your application generates with POST /templates, or build it in the web app and reuse it from the API."},{"name":"Account","description":"The user an API token belongs to."},{"name":"Template Preview Sessions","description":"Read-only embedded previews with synthetic values; no signing submission is created."}],"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 applications-specific identifier provided for the template via API or Embedded template form builder. It allows you to receive only templates with your specified external id."},{"name":"folder","in":"query","required":false,"schema":{"type":"string"},"description":"Filter templates by folder name."},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"},"description":"Get only archived templates instead of active ones."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"The number of templates to return. Default value is 10. Maximum value is 100."},{"name":"after","in":"query","required":false,"schema":{"type":"integer"},"description":"The unique identifier of the template to start the list from. It allows you to receive only templates with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of templates."},{"name":"before","in":"query","required":false,"schema":{"type":"integer"},"description":"The unique identifier of the template to end the list with. It allows you to receive only templates with id less than the specified value."}],"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":"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 indentifier 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","strikethrough"]},"required":{"type":"boolean","description":"Indicates if the field is required."},"preferences":{"type":"object","properties":{"font_size":{"type":"integer","description":"Font size of the field value in pixels."},"font_type":{"type":"string","description":"Font type of the field value."},"font":{"type":"string","description":"Font family of the field value."},"color":{"type":"string","description":"Font color of the field value."},"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","items":{"type":"object","required":["name","uuid"],"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","nullable":true,"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","nullable":true,"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."},"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","nullable":true,"description":"The ID of the tempate after which the next page starts."},"prev":{"type":"integer","nullable":true,"description":"The ID of the tempate 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://esigncenter.com/file/hash/sample-document.pdf","preview_image_url":"https://esigncenter.com/file/hash/0.jpg","filename":"example-document.pdf"}]}],"pagination":{"count":1,"next":1,"prev":2}}}}}}},"post":{"security":[{"AuthToken":[]}],"tags":["Templates"],"summary":"Create a template from a PDF","operationId":"createTemplate","description":"The API endpoint provides the functionality to create a reusable, signable template from documents your application generates. Send each file base64-encoded, and optionally the signing parties and where each field goes. PDF and image files only - Word, Excel and HTML are not accepted here.\n\nLeave `fields` out and the fillable form fields already present in the PDF are detected and used. Send `fields` and detection is skipped: the fields are placed exactly where the `areas` coordinates put them.\n\nA `template.created` webhook is delivered to every endpoint subscribed to it - see <a href=\"https://esigncenter.com/help/api-and-webhooks\" target=\"_blank\" class=\"link font-bold\">the API and webhooks guide</a>.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["documents"],"properties":{"name":{"type":"string","description":"Name of the template. Defaults to the file name of the first document.","example":"Disclosure - Jane Smith"},"external_id":{"type":"string","description":"Your application-specific identifier for this template, returned on the template and usable as a filter on `GET /templates`. `application_key` is accepted as an alias.","example":"crm-record-1042"},"folder_name":{"type":"string","description":"Name of the folder to create the template in. The folder is created if it does not exist yet.","example":"Contracts"},"documents":{"type":"array","minItems":1,"maxItems":20,"description":"The files the template is built from. At least one, up to 20.","items":{"type":"object","required":["file"],"properties":{"name":{"type":"string","description":"Name of the document. Defaults to document-1.pdf, document-2.pdf and so on.","example":"disclosure"},"file":{"type":"string","format":"base64","example":"base64","description":"Base64-encoded PDF or image file, up to 25MB once decoded. Word, Excel and HTML files are refused with a 422."}}}},"submitters":{"type":"array","maxItems":100,"description":"The signing parties. Names must be unique. Defaults to a single party named 'First Party'.","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the signing party.","example":"Borrower"},"role":{"type":"string","description":"Accepted as an alias for `name`."}}},"example":[{"name":"Borrower"},{"name":"Lender"}]},"fields":{"type":"array","maxItems":1000,"description":"Where the fields go. Leave this out to use the fillable fields already in the PDF.","items":{"type":"object","properties":{"name":{"type":"string","description":"Name of the field."},"type":{"type":"string","enum":["text","date","checkbox","radio","signature","number","multiple","select","initials","image","file","stamp","cells","phone","payment"],"default":"text","description":"Type of the field."},"role":{"type":"string","description":"Name of the submitter who fills this field. Must match one of the `submitters` names; the first submitter is used when it is omitted."},"required":{"type":"boolean","default":true,"description":"Indicates if the field is required."},"readonly":{"type":"boolean","default":false,"description":"Indicates if the field is filled in advance and cannot be changed by the signer."},"title":{"type":"string","description":"Field title shown on the signing form instead of the name."},"description":{"type":"string","description":"Field description shown on the signing form."},"default_value":{"description":"Value the field is pre-filled with. A string, or an array for fields that take several values."},"preferences":{"type":"object","description":"Field appearance preferences (font size, font, colour, alignment), as returned in the template response."},"options":{"type":"array","maxItems":200,"description":"Choices for 'radio', 'multiple' and 'select' fields. Required for 'radio' and 'multiple', which also need one area per option.","items":{"type":"object","required":["value"],"properties":{"value":{"type":"string","description":"The option shown to the signer."}}},"example":[{"value":"Single"},{"value":"Married"}]},"areas":{"type":"array","maxItems":200,"description":"Where the field is placed. Coordinates are fractions of the page between 0 and 1, not pixels.","items":{"type":"object","required":["x","y","w","h"],"properties":{"x":{"type":"number","minimum":0,"maximum":1,"description":"Distance of the left edge of the field box from the left edge of the page, as a fraction of the page width."},"y":{"type":"number","minimum":0,"maximum":1,"description":"Distance of the top edge of the field box from the top of the page, as a fraction of the page height."},"w":{"type":"number","minimum":0,"maximum":1,"description":"Width of the field box, as a fraction of the page width."},"h":{"type":"number","minimum":0,"maximum":1,"description":"Height of the field box, as a fraction of the page height."},"page":{"type":"integer","minimum":0,"default":0,"description":"Page the field box is on. The first page is 0."},"document":{"type":"integer","minimum":0,"default":0,"description":"Index of the uploaded document the field box is on, in the order the documents were sent. The first document is 0."},"cell_w":{"type":"number","description":"Width of a single character cell, for the 'cells' field type."},"option":{"type":"string","description":"For 'radio' and 'multiple' fields, the option this box belongs to: the option's value, or its 0-based index. Each option needs its own box."}}}}}}}}}}}},"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":"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 indentifier 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","strikethrough"]},"required":{"type":"boolean","description":"Indicates if the field is required."},"preferences":{"type":"object","properties":{"font_size":{"type":"integer","description":"Font size of the field value in pixels."},"font_type":{"type":"string","description":"Font type of the field value."},"font":{"type":"string","description":"Font family of the field value."},"color":{"type":"string","description":"Font color of the field value."},"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","items":{"type":"object","required":["name","uuid"],"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","nullable":true,"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","nullable":true,"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."},"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://esigncenter.com/file/hash/sample-document.pdf","preview_image_url":"https://esigncenter.com/file/hash/0.jpg","filename":"example-document.pdf"}]}}}},"403":{"description":"Forbidden - the API is not included in this account's plan, or a field type in the request is not."},"422":{"description":"Unprocessable Content - invalid parameters, an unsupported or password-protected file, or the account's storage limit reached. Nothing is created."},"429":{"description":"Too Many Requests - more than 300 template creations in a minute for this account."}}}},"/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":"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 indentifier 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","strikethrough"]},"required":{"type":"boolean","description":"Indicates if the field is required."},"preferences":{"type":"object","properties":{"font_size":{"type":"integer","description":"Font size of the field value in pixels."},"font_type":{"type":"string","description":"Font type of the field value."},"font":{"type":"string","description":"Font family of the field value."},"color":{"type":"string","description":"Font color of the field value."},"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","items":{"type":"object","required":["name","uuid"],"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","nullable":true,"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","nullable":true,"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."},"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://esigncenter.com/file/hash/sample-document.pdf","preview_image_url":"https://esigncenter.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","nullable":true,"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","example":"New Document Name"},"folder_name":{"type":"string","description":"The folder's name to which the template should be moved.","example":"New Folder"},"roles":{"type":"array","description":"An array of submitter role names to update the template with.","items":{"type":"string"},"example":["Agent","Customer"]},"archived":{"type":"boolean","description":"Set `false` to unarchive template."}}}}}},"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 submitters name, email or phone partial match."},{"name":"slug","in":"query","required":false,"schema":{"type":"string"},"description":"Filter submissions by unique slug.","example":"NtLDQM7eJX2ZMd"},{"name":"template_folder","in":"query","required":false,"schema":{"type":"string"},"description":"Filter submissions by template folder name."},{"name":"archived","in":"query","required":false,"schema":{"type":"boolean"},"description":"Returns only archived submissions when `true` and only active submissions when `false`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"The number of submissions to return. Default value is 10. Maximum value is 100."},{"name":"after","in":"query","required":false,"schema":{"type":"integer"},"description":"The unique identifier of the submission to start the list from. It allows you to receive only submissions with an ID greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submissions."},{"name":"before","in":"query","required":false,"schema":{"type":"integer"},"description":"The unique identifier of the submission that marks the end of the list. It allows you to receive only submissions with an ID less than the specified value."}],"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","example":"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","nullable":true,"description":"Audit log file URL."},"combined_document_url":{"type":"string","nullable":true,"description":"Combined PDF file URL with documents and Audit Log."},"completed_at":{"type":"string","nullable":true,"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","nullable":true,"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":"Submission unique ID number."},"submission_id":{"type":"integer","description":"Submission ID number."},"uuid":{"type":"string","description":"Submitter UUID."},"email":{"type":"string","nullable":true,"description":"The email address of the submitter."},"slug":{"type":"string","description":"Unique key to be used in the form signing link and embedded form."},"sent_at":{"type":"string","nullable":true,"description":"The date and time when the signing request was sent to the submitter."},"opened_at":{"type":"string","nullable":true,"description":"The date and time when the submitter opened the signing form."},"completed_at":{"type":"string","nullable":true,"description":"The date and time when the submitter completed the signing form."},"declined_at":{"type":"string","nullable":true,"description":"The date and time when the submitter declined to complete the signing form."},"created_at":{"type":"string","description":"The date and time when the submitter was created."},"updated_at":{"type":"string","description":"The date and time when the submitter was last updated."},"name":{"type":"string","nullable":true,"description":"Submitter name."},"phone":{"type":"string","nullable":true,"description":"Submitter phone number."},"external_id":{"type":"string","nullable":true,"description":"Your application-specific unique string key to identify this submitter within your app."},"status":{"type":"string","description":"The status of signing request for the submitter.","enum":["completed","declined","opened","sent","awaiting"]},"role":{"type":"string","description":"The role of the submitter."},"metadata":{"type":"object","description":"Metadata object with additional submitter information."},"preferences":{"type":"object","description":"Object with submitter preferences."}}}},"template":{"type":"object","required":["id","name","external_id","folder_name","created_at","updated_at"],"properties":{"id":{"type":"integer","description":"Template unique ID number."},"name":{"type":"string","description":"The name of the submission template."},"external_id":{"type":"string","nullable":true,"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 submission template was created."},"updated_at":{"type":"string","description":"The date and time when the submission template was last updated."}}},"created_by_user":{"type":"object","nullable":true,"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","nullable":true,"description":"The ID of the submission after which the next page starts."},"prev":{"type":"integer","nullable":true,"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://esigncenter.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).","operationId":"createSubmission","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["template_id","submitters"],"properties":{"template_id":{"type":"integer","description":"The unique identifier of the template. Document template forms can be created via the Web UI, PDF and DOCX API, or HTML API.","example":1000001},"send_email":{"type":"boolean","description":"Set `false` to disable signature request emails sending.","default":true},"send_sms":{"type":"boolean","description":"Set `true` to send signature request via phone number and SMS.","default":false},"order":{"type":"string","description":"Pass 'random' to send signature request emails to all parties right away. The order is 'preserved' by default so the second party will receive a signature request email only after the document is signed by the first party.","default":"preserved","enum":["preserved","random"]},"completed_redirect_url":{"type":"string","description":"Specify URL to redirect to after the submission completion."},"bcc_completed":{"type":"string","description":"Specify BCC address to send signed documents to after the completion."},"reply_to":{"type":"string","description":"Specify Reply-To address to use in the notification emails."},"expire_at":{"type":"string","description":"Specify the expiration date and time after which the submission becomes unavailable for signature.","example":"2024-09-01 12:00:00 UTC"},"message":{"type":"object","properties":{"subject":{"type":"string","description":"Custom signature request email subject."},"body":{"type":"string","description":"Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."}}},"submitters":{"type":"array","description":"The list of submitters for the submission.","items":{"type":"object","required":["email"],"properties":{"name":{"type":"string","description":"The name of the submitter."},"role":{"type":"string","description":"The role name or title of the submitter.","example":"First Party"},"email":{"type":"string","description":"The email address of the submitter.","format":"email","example":"john.doe@example.com"},"phone":{"type":"string","description":"The phone number of the submitter, formatted according to the E.164 standard.","example":"+1234567890"},"values":{"type":"object","description":"An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."},"external_id":{"type":"string","description":"Your application-specific unique string key to identify this submitter within your app."},"completed":{"type":"boolean","description":"Pass `true` to mark submitter as completed and auto-signed via API. No ESIGN consent is collected or recorded for such a submitter — your application is responsible for the signer's consent to sign electronically; the audit trail marks this completion as made via API."},"metadata":{"type":"object","description":"Metadata object with additional submitter information.","example":"{ \"customField\": \"value\" }"},"send_email":{"type":"boolean","description":"Set `false` to disable signature request emails sending only for this submitter.","default":true},"send_sms":{"type":"boolean","description":"Set `true` to send signature request via phone number and SMS.","default":false},"reply_to":{"type":"string","description":"Specify Reply-To address to use in the notification emails for this submitter."},"completed_redirect_url":{"type":"string","description":"Submitter specific URL to redirect to after the submission completion."},"order":{"type":"integer","description":"The order of the submitter in the workflow (e.g., 0 for the first signer, 1 for the second, etc.). Use the same order number to create order groups. By default, submitters are ordered as in the submitters array."},"require_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. Phone (SMS) verification is not offered: a truthy `require_phone_2fa` is rejected with 422 — use `require_email_2fa` instead.","default":false},"message":{"type":"object","properties":{"subject":{"type":"string","description":"Custom signature request email subject for the submitter."},"body":{"type":"string","description":"Custom signature request email body for the submitter. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."}}},"fields":{"type":"array","description":"A list of configurations for template document form fields.","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Document template field name.","example":"First Name"},"default_value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}],"description":"Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.","example":"Acme"},"readonly":{"type":"boolean","description":"Set `true` to make it impossible for the submitter to edit predefined field value.","default":false},"required":{"type":"boolean","description":"Set `true` to make the field required."},"title":{"type":"string","description":"Field title displayed to the user instead of the name, shown on the signing form. Supports Markdown."},"description":{"type":"string","description":"Field description displayed on the signing form. Supports Markdown."},"validation":{"type":"object","properties":{"pattern":{"type":"string","description":"HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.","example":"[A-Z]{4}"},"message":{"type":"string","description":"A custom error message to display on validation failure."},"min":{"oneOf":[{"type":"number"},{"type":"string"}],"description":"Minimum allowed number value or date depending on field type."},"max":{"oneOf":[{"type":"number"},{"type":"string"}],"description":"Maximum allowed number value or date depending on field type."},"step":{"type":"number","description":"Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."}}},"preferences":{"type":"object","properties":{"font_size":{"type":"integer","description":"Font size of the field value in pixels.","example":12},"font_type":{"type":"string","description":"Font type of the field value.","enum":["bold","italic","bold_italic"]},"font":{"type":"string","description":"Font family of the field value.","enum":["Times","Helvetica","Courier"]},"color":{"type":"string","description":"Font color of the field value.","enum":["black","white","blue"],"default":"black"},"background":{"type":"string","description":"Field box background color.","enum":["black","white","blue"]},"align":{"type":"string","description":"Horizontal alignment of the field text value.","enum":["left","center","right"],"default":"left"},"valign":{"type":"string","description":"Vertical alignment of the field text value.","enum":["top","center","bottom"],"default":"center"},"format":{"type":"string","description":"The data format for different field types.<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.","example":"DD/MM/YYYY"},"price":{"type":"number","description":"Price value of the payment field. Only for payment fields.","example":99.99},"currency":{"type":"string","description":"Currency value of the payment field. Only for payment fields.","enum":["USD","EUR","GBP","CAD","AUD"],"default":"USD"},"mask":{"description":"Set `true` to make sensitive data masked on the document.","oneOf":[{"type":"integer"},{"type":"boolean"}],"default":false},"reasons":{"description":"An array of signature reasons to choose from.","type":"array","items":{"type":"string"}}}}}}},"roles":{"type":"array","description":"A list of roles for the submitter. Use this param to merge multiple roles into one submitter.","items":{"type":"string"}}}}}}}}}},"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 UUID."},"uuid":{"type":"string","description":"Submitter UUID."},"email":{"type":"string","nullable":true,"description":"The email address of the submitter."},"slug":{"type":"string","description":"Unique key to be used in the signing form URL."},"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 submission.","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"},"sent_at":{"type":"string","nullable":true,"description":"The date and time when the signing request was sent to the submitter."},"opened_at":{"type":"string","nullable":true,"description":"The date and time when the submitter opened the signing form."},"completed_at":{"type":"string","nullable":true,"description":"The date and time when the submitter completed the signing form."},"declined_at":{"type":"string","nullable":true,"description":"The date and time when the submitter declined the signing form."},"created_at":{"type":"string","description":"The date and time when the submitter was created."},"updated_at":{"type":"string","description":"The date and time when the submitter was last updated."},"name":{"type":"string","nullable":true,"description":"The name of the submitter."},"phone":{"type":"string","nullable":true,"description":"The phone number of the submitter."},"external_id":{"type":"string","nullable":true,"description":"Your application-specific unique string key to identify this submitter within your app."},"preferences":{"type":"object","properties":{"send_email":{"type":"boolean","description":"Indicates whether the signature request email should be sent."},"send_sms":{"type":"boolean","description":"Indicates whether the signature request should be sent via SMS."}}},"role":{"type":"string","description":"The role of the submitter in the signing process."},"embed_src":{"type":"string","description":"The `src` URL value to embed the signing form or sign via a link."}}}},"example":[{"id":1,"submission_id":1,"uuid":"884d545b-3396-49f1-8c07-05b8b2a78755","email":"john.doe@example.com","slug":"pAMimKcyrLjqVt","sent_at":"2023-12-13T23:04:04.252Z","opened_at":null,"completed_at":null,"declined_at":null,"created_at":"2023-12-14T15:50:21.799Z","updated_at":"2023-12-14T15:50:21.799Z","name":"string","phone":"+1234567890","external_id":"2321","metadata":{"customData":"custom value"},"status":"sent","values":[{"field":"Full Name","value":"John Doe"}],"preferences":{"send_email":true,"send_sms":false},"role":"First Party","embed_src":"https://esigncenter.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","example":"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","nullable":true,"description":"Audit log file URL."},"combined_document_url":{"type":"string","nullable":true,"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","nullable":true,"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","nullable":true,"description":"The email address of the submitter."},"slug":{"type":"string","description":"Unique key to be used in the form signing link and embedded form."},"sent_at":{"type":"string","nullable":true,"description":"The date and time when the signing request was sent to the submitter."},"opened_at":{"type":"string","nullable":true,"description":"The date and time when the submitter opened the signing form."},"completed_at":{"type":"string","nullable":true,"description":"The date and time when the submitter completed the signing form."},"declined_at":{"type":"string","nullable":true,"description":"The date and time when the submitter declined the signing form."},"created_at":{"type":"string","description":"The date and time when the submitter was created."},"updated_at":{"type":"string","description":"The date and time when the submitter was last updated."},"name":{"type":"string","nullable":true,"description":"Submitter name."},"phone":{"type":"string","nullable":true,"description":"Submitter phone number."},"external_id":{"type":"string","nullable":true,"description":"Your application-specific unique string key to identify this submitter within your app."},"status":{"type":"string","description":"The status of signing request for the submitter.","enum":["completed","declined","opened","sent","awaiting"]},"values":{"type":"array","description":"An array of field 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":"Template unique ID number."},"name":{"type":"string","description":"The name of the submission template."},"external_id":{"type":"string","nullable":true,"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 submission template was created."},"updated_at":{"type":"string","description":"The date and time when the submission template was last updated."}}},"created_by_user":{"type":"object","nullable":true,"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","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","nullable":true,"description":"The date and time when the submission was fully completed."}}},"example":{"id":1,"name":null,"source":"link","submitters_order":"random","slug":"VyL4szTwYoSvXq","audit_log_url":"https://esigncenter.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://esigncenter.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://esigncenter.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","nullable":true,"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}],"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","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://esigncenter.com/file/hash/example.pdf"}]}}}}}}},"/signing_sessions":{"post":{"security":[{"AuthToken":[]}],"tags":["Signing Sessions"],"summary":"Create an embeddable signing session","description":"Creates an embedded signing session from an existing template or from generated PDF/image documents with fixed fields. Keep the X-Auth-Token on your backend and pass the returned embed_src to the frontend.","operationId":"createSigningSession","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["embed_origin","submitters"],"properties":{"template_id":{"type":"integer","description":"Existing template ID. Send either template_id or documents, not both."},"name":{"type":"string","description":"Name for a generated signing-session template."},"external_id":{"type":"string","description":"Application-specific ID for this signing session."},"application_key":{"type":"string","description":"Alternative application-specific key."},"embed_origin":{"type":"string","description":"HTTPS origin allowed to iframe the signer. Local development may use http://localhost, http://127.0.0.1, or http://[::1].","example":"https://app-a.example.com"},"send_email":{"type":"boolean","description":"Set true to send EsignCenter signature request emails. Defaults to false for signing sessions.","default":false},"send_sms":{"type":"boolean","description":"Set true to send signature requests by SMS. Defaults to false.","default":false},"completed_redirect_url":{"type":"string","description":"Optional URL to redirect the signer after completion."},"folder_name":{"type":"string","description":"Folder name for generated templates."},"metadata":{"type":"object","description":"Metadata copied onto the signing session submitters."},"variables":{"type":"object","description":"Variables used to populate template values."},"documents":{"type":"array","description":"Documents for a generated signing-session template. Required when template_id is not supplied.","items":{"type":"object","required":["file"],"properties":{"name":{"type":"string","description":"Document filename."},"file":{"type":"string","description":"Base64-encoded PDF or image file."}}}},"submitters":{"type":"array","description":"Submitters who will sign the embedded session.","items":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string"},"email":{"type":"string","format":"email"},"phone":{"type":"string"},"external_id":{"type":"string"},"metadata":{"type":"object"},"values":{"type":"object"},"send_email":{"type":"boolean","default":false},"send_sms":{"type":"boolean","default":false}}}},"fields":{"type":"array","description":"Fixed fields to place on generated documents.","items":{"type":"object","required":["areas"],"properties":{"name":{"type":"string"},"type":{"type":"string","enum":["text","date","checkbox","radio","signature","number","multiple","select","initials","image","file","stamp","cells","phone","payment"]},"role":{"type":"string"},"required":{"type":"boolean"},"readonly":{"type":"boolean"},"default_value":{},"areas":{"type":"array","items":{"type":"object","required":["x","y","w","h"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1},"page":{"type":"integer","minimum":0},"document":{"type":"integer","minimum":0}}}}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","submission_id","template_id","status","embed_src","submitters","documents_url","status_url","created_at","updated_at"],"properties":{"id":{"type":"integer","description":"Signing session ID. This is the underlying submission ID."},"submission_id":{"type":"integer","description":"Submission ID for the signing session."},"template_id":{"type":"integer","description":"Template ID used by the signing session."},"external_id":{"type":"string","nullable":true,"description":"Application-specific external ID supplied when creating the signing session."},"status":{"type":"string","enum":["pending","completed","declined","expired"],"description":"Current signing session status."},"completed_at":{"type":"string","nullable":true,"description":"Date and time when all submitters completed the signing session."},"embed_src":{"type":"string","description":"Signer URL to load in an embedded signing iframe."},"submitter_id":{"type":"integer","description":"First submitter ID for single-signer sessions."},"submitters":{"type":"array","description":"Submitters created for this signing session.","items":{"type":"object","properties":{"id":{"type":"integer"},"submission_id":{"type":"integer"},"uuid":{"type":"string"},"email":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string"},"completed_at":{"type":"string","nullable":true},"role":{"type":"string"},"embed_src":{"type":"string"}}}},"documents_url":{"type":"string","description":"API URL to download completed signing-session documents."},"status_url":{"type":"string","description":"API URL to poll this signing session status."},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}},"422":{"description":"Unprocessable Content"},"429":{"description":"Too Many Requests"}}}},"/signing_sessions/{id}":{"get":{"security":[{"AuthToken":[]}],"tags":["Signing Sessions"],"summary":"Get signing session status","description":"Returns current status and embed/document URLs for an embedded signing session.","operationId":"getSigningSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Signing session ID returned by createSigningSession."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","submission_id","template_id","status","embed_src","submitters","documents_url","status_url","created_at","updated_at"],"properties":{"id":{"type":"integer","description":"Signing session ID. This is the underlying submission ID."},"submission_id":{"type":"integer","description":"Submission ID for the signing session."},"template_id":{"type":"integer","description":"Template ID used by the signing session."},"external_id":{"type":"string","nullable":true,"description":"Application-specific external ID supplied when creating the signing session."},"status":{"type":"string","enum":["pending","completed","declined","expired"],"description":"Current signing session status."},"completed_at":{"type":"string","nullable":true,"description":"Date and time when all submitters completed the signing session."},"embed_src":{"type":"string","description":"Signer URL to load in an embedded signing iframe."},"submitter_id":{"type":"integer","description":"First submitter ID for single-signer sessions."},"submitters":{"type":"array","description":"Submitters created for this signing session.","items":{"type":"object","properties":{"id":{"type":"integer"},"submission_id":{"type":"integer"},"uuid":{"type":"string"},"email":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string"},"completed_at":{"type":"string","nullable":true},"role":{"type":"string"},"embed_src":{"type":"string"}}}},"documents_url":{"type":"string","description":"API URL to download completed signing-session documents."},"status_url":{"type":"string","description":"API URL to poll this signing session status."},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}},"404":{"description":"Not Found"}}}},"/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.","example":1000001},"emails":{"type":"string","description":"A comma-separated list of email addresses to send the submission to.","example":"{{emails}}"},"send_email":{"type":"boolean","description":"Set `false` to disable signature request emails sending.","default":true},"message":{"type":"object","properties":{"subject":{"type":"string","description":"Custom signature request email subject."},"body":{"type":"string","description":"Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."}}}}}}}},"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 UUID."},"uuid":{"type":"string","description":"Submitter UUID."},"email":{"type":"string","nullable":true,"description":"The email address of the submitter."},"slug":{"type":"string","description":"Unique key to be used in the signing form URL."},"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 submission.","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"},"sent_at":{"type":"string","nullable":true,"description":"The date and time when the signing request was sent to the submitter."},"opened_at":{"type":"string","nullable":true,"description":"The date and time when the submitter opened the signing form."},"completed_at":{"type":"string","nullable":true,"description":"The date and time when the submitter completed the signing form."},"declined_at":{"type":"string","nullable":true,"description":"The date and time when the submitter declined the signing form."},"created_at":{"type":"string","description":"The date and time when the submitter was created."},"updated_at":{"type":"string","description":"The date and time when the submitter was last updated."},"name":{"type":"string","nullable":true,"description":"The name of the submitter."},"phone":{"type":"string","nullable":true,"description":"The phone number of the submitter."},"external_id":{"type":"string","nullable":true,"description":"Your application-specific unique string key to identify this submitter within your app."},"preferences":{"type":"object","properties":{"send_email":{"type":"boolean","description":"Indicates whether the signature request email should be sent."},"send_sms":{"type":"boolean","description":"Indicates whether the signature request should be sent via SMS."}}},"role":{"type":"string","description":"The role of the submitter in the signing process."},"embed_src":{"type":"string","description":"The `src` URL value to embed the signing form or sign via a link."}}}},"example":[{"id":1,"submission_id":1,"uuid":"884d545b-3396-49f1-8c07-05b8b2a78755","email":"john.doe@example.com","slug":"pAMimKcyrLjqVt","sent_at":"2023-12-13T23:04:04.252Z","opened_at":null,"completed_at":null,"declined_at":null,"created_at":"2023-12-14T15:50:21.799Z","updated_at":"2023-12-14T15:50:21.799Z","name":"string","phone":"+1234567890","external_id":"2321","metadata":{"customData":"custom value"},"status":"sent","values":[{"field":"Full Name","value":"John Doe"}],"preferences":{"send_email":true,"send_sms":false},"role":"First Party","embed_src":"https://esigncenter.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"}]}}}}}},"/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","nullable":true,"description":"The email address of the submitter."},"slug":{"type":"string","description":"Unique key to be used in the form signing link and embedded form."},"sent_at":{"type":"string","nullable":true,"description":"The date and time when the signing request was sent to the submitter."},"opened_at":{"type":"string","nullable":true,"description":"The date and time when the submitter opened the signing form."},"completed_at":{"type":"string","nullable":true,"description":"The date and time when the submitter completed the signing form."},"declined_at":{"type":"string","nullable":true,"description":"The date and time when the submitter declined the signing form."},"created_at":{"type":"string","description":"The date and time when the submitter was created."},"updated_at":{"type":"string","description":"The date and time when the submitter was last updated."},"name":{"type":"string","nullable":true,"description":"Submitter name."},"phone":{"type":"string","nullable":true,"description":"Submitter phone number."},"status":{"type":"string","description":"Submitter's submission status.","enum":["completed","declined","opened","sent","awaiting"]},"external_id":{"type":"string","nullable":true,"description":"The unique applications-specific identifier"},"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":"number","description":"The template's unique identifier."},"name":{"type":"string","description":"The template's name."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"submission_events":{"type":"array","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://esigncenter.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.","operationId":"updateSubmitter","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The unique identifier of the submitter.","example":500001}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"The name of the submitter."},"email":{"type":"string","description":"The email address of the submitter.","format":"email","example":"john.doe@example.com"},"phone":{"type":"string","description":"The phone number of the submitter, formatted according to the E.164 standard.","example":"+1234567890"},"values":{"type":"object","description":"An object with pre-filled values for the submission. Use field names for keys of the object. For more configurations see `fields` param."},"external_id":{"type":"string","description":"Your application-specific unique string key to identify this submitter within your app."},"send_email":{"type":"boolean","description":"Set `true` to re-send signature request emails."},"send_sms":{"type":"boolean","description":"Set `true` to re-send signature request via phone number SMS.","default":false},"reply_to":{"type":"string","description":"Specify Reply-To address to use in the notification emails."},"completed":{"type":"boolean","description":"Pass `true` to mark submitter as completed and auto-signed via API. No ESIGN consent is collected or recorded for such a submitter — your application is responsible for the signer's consent to sign electronically; the audit trail marks this completion as made via API."},"metadata":{"type":"object","description":"Metadata object with additional submitter information.","example":"{ \"customField\": \"value\" }"},"completed_redirect_url":{"type":"string","description":"Submitter specific URL to redirect to after the submission completion."},"message":{"type":"object","properties":{"subject":{"type":"string","description":"Custom signature request email subject."},"body":{"type":"string","description":"Custom signature request email body. Can include the following variables: {{template.name}}, {{submitter.link}}, {{account.name}}."}}},"fields":{"type":"array","description":"A list of configurations for template document form fields.","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Document template field name.","example":"First Name"},"default_value":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"array","items":{"oneOf":[{"type":"string"},{"type":"number"},{"type":"boolean"}]}}],"description":"Default value of the field. Use base64 encoded file or a public URL to the image file to set default signature or image fields.","example":"Acme"},"readonly":{"type":"boolean","description":"Set `true` to make it impossible for the submitter to edit predefined field value.","default":false},"required":{"type":"boolean","description":"Set `true` to make the field required."},"validation":{"type":"object","properties":{"pattern":{"type":"string","description":"HTML field validation pattern string based on https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/pattern specification.","example":"[A-Z]{4}"},"message":{"type":"string","description":"A custom error message to display on validation failure."},"min":{"oneOf":[{"type":"number"},{"type":"string"}],"description":"Minimum allowed number value or date depending on field type."},"max":{"oneOf":[{"type":"number"},{"type":"string"}],"description":"Maximum allowed number value or date depending on field type."},"step":{"type":"number","description":"Increment step for number field. Pass 1 to accept only integers, or 0.01 to accept decimal currency."}}},"preferences":{"type":"object","properties":{"font_size":{"type":"integer","description":"Font size of the field value in pixels.","example":12},"font_type":{"type":"string","description":"Font type of the field value.","enum":["bold","italic","bold_italic"]},"font":{"type":"string","description":"Font family of the field value.","enum":["Times","Helvetica","Courier"]},"color":{"type":"string","description":"Font color of the field value.","enum":["black","white","blue"],"default":"black"},"background":{"type":"string","description":"Field box background color.","enum":["black","white","blue"]},"align":{"type":"string","description":"Horizontal alignment of the field text value.","enum":["left","center","right"],"default":"left"},"valign":{"type":"string","description":"Vertical alignment of the field text value.","enum":["top","center","bottom"],"default":"center"},"format":{"type":"string","description":"The data format for different field types.<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.","example":"DD/MM/YYYY"},"price":{"type":"number","description":"Price value of the payment field. Only for payment fields.","example":99.99},"currency":{"type":"string","description":"Currency value of the payment field. Only for payment fields.","enum":["USD","EUR","GBP","CAD","AUD"],"default":"USD"},"mask":{"description":"Set `true` to make sensitive data masked on the document.","oneOf":[{"type":"integer"},{"type":"boolean"}],"default":false},"reasons":{"description":"An array of signature reasons to choose from.","type":"array","items":{"type":"string"}}}}}}}}}}}},"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","nullable":true,"description":"The email address of the submitter."},"slug":{"type":"string","description":"Unique key to be used in the form signing link and embedded form."},"sent_at":{"type":"string","nullable":true,"description":"The date and time when the signing request was sent to the submitter."},"opened_at":{"type":"string","nullable":true,"description":"The date and time when the submitter opened the signing form."},"completed_at":{"type":"string","nullable":true,"description":"The date and time when the submitter completed the signing form."},"declined_at":{"type":"string","nullable":true,"description":"The date and time when the submitter declined the signing form."},"created_at":{"type":"string","description":"The date and time when the submitter was created."},"updated_at":{"type":"string","description":"The date and time when the submitter was last updated."},"name":{"type":"string","nullable":true,"description":"Submitter name."},"phone":{"type":"string","nullable":true,"description":"Submitter phone number."},"status":{"type":"string","description":"Submitter's submission status.","enum":["completed","declined","opened","sent","awaiting"]},"external_id":{"type":"string","nullable":true,"description":"The unique applications-specific identifier"},"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://esigncenter.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 applications-specific identifier provided for a submitter when initializing a signature request. It allows you to receive only submitters with a specified external id."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"The number of submitters to return. Default value is 10. Maximum value is 100."},{"name":"after","in":"query","required":false,"schema":{"type":"integer"},"description":"The unique identifier of the submitter to start the list from. It allows you to receive only submitters with id greater than the specified value. Pass ID value from the `pagination.next` response to load the next batch of submitters."},{"name":"before","in":"query","required":false,"schema":{"type":"integer"},"description":"The unique identifier of the submitter to end the list with. It allows you to receive only submitters with id less than the specified value."}],"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 slug of the submitter form."},"sent_at":{"type":"string","nullable":true,"description":"The date and time when the signing request was sent to the submitter."},"opened_at":{"type":"string","nullable":true,"description":"The date and time when the submitter opened the signing form."},"completed_at":{"type":"string","nullable":true,"description":"The date and time when the submitter completed the signing form."},"declined_at":{"type":"string","nullable":true,"description":"The date and time when the submitter declined the signing form."},"created_at":{"type":"string","description":"The date and time when the submitter was created."},"updated_at":{"type":"string","description":"The date and time when the submitter was last updated."},"name":{"type":"string","nullable":true,"description":"Submitter name."},"phone":{"type":"string","nullable":true,"description":"Submitter phone number."},"status":{"type":"string","description":"Submitter's submission status.","enum":["completed","declined","opened","sent","awaiting"]},"external_id":{"type":"string","nullable":true,"description":"The unique applications-specific identifier"},"preferences":{"type":"object","description":"Submitter preferences."},"metadata":{"type":"object","description":"Metadata object with additional submitter information."},"submission_events":{"type":"array","items":{"type":"object","required":["id","submitter_id","event_type","event_timestamp"],"properties":{"id":{"type":"integer","description":"Unique identifier of the submission event."},"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 submission.","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","nullable":true,"description":"The ID of the submitter after which the next page starts."},"prev":{"type":"integer","nullable":true,"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://esigncenter.com/file/eyJfcmFpbHMiOnsiIiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f9758362acced0f3c86cdffad02800e/sample-document.pdf"}],"role":"First Party"}],"pagination":{"count":1,"next":1,"prev":1}}}}}}}},"/templates/{id}/clone":{"post":{"security":[{"AuthToken":[]}],"tags":["Templates"],"summary":"Clone a template","description":"The API endpoint allows you to clone existing template into a new template.","operationId":"cloneTemplate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"The unique identifier of the documents template.","example":1000001}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Template name. Existing name with (Clone) suffix will be used if not specified.","example":"Cloned Template"},"folder_name":{"type":"string","description":"The folder's name to which the template should be cloned."},"external_id":{"type":"string","description":"Your application-specific unique string key to identify this template within your app."}}}}}},"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":"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 indentifier 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","strikethrough"]},"required":{"type":"boolean","description":"Indicates if the field is required."},"preferences":{"type":"object","properties":{"font_size":{"type":"integer","description":"Font size of the field value in pixels."},"font_type":{"type":"string","description":"Font type of the field value."},"font":{"type":"string","description":"Font family of the field value."},"color":{"type":"string","description":"Font color of the field value."},"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","items":{"type":"object","required":["name","uuid"],"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","nullable":true,"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","nullable":true,"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."},"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://esigncenter.com/file/hash/sample-document.pdf","filename":"sample-document.pdf"}]}}}}}}},"/template_builder_sessions":{"post":{"security":[{"AuthToken":[]}],"tags":["Template Builder Sessions"],"summary":"Create an embeddable template builder session","description":"Creates a short-lived embedded template builder URL for a CRM or another app. The session can open an existing template, clone a saved template, clone and replace documents, or create a new template from base64 PDF/image documents. Keep the X-Auth-Token on your backend and pass only builder_src to the frontend.","operationId":"createTemplateBuilderSession","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["embed_origin"],"properties":{"template_id":{"type":"integer","description":"Existing template ID to open in the embedded builder. Send this by itself, without clone_template_id or documents."},"clone_template_id":{"type":"integer","description":"Template ID to clone before opening the embedded builder. May be combined with documents to replace the cloned document while preserving field placement."},"name":{"type":"string","description":"Template name for cloned or newly generated templates."},"external_id":{"type":"string","description":"Application-specific ID for this template or CRM record."},"application_key":{"type":"string","description":"Alternative application-specific key."},"folder_name":{"type":"string","description":"Folder name for cloned or generated templates."},"embed_origin":{"type":"string","description":"HTTPS origin allowed to iframe the builder. Local development may use http://localhost, http://127.0.0.1, or http://[::1].","example":"https://crm.example.com"},"expires_in_minutes":{"type":"integer","description":"Optional builder token lifetime in minutes. The maximum is 24 hours."},"metadata":{"type":"object","description":"Metadata stored with the builder session preferences."},"documents":{"type":"array","description":"Documents for a new template, or replacement documents when clone_template_id is supplied.","items":{"type":"object","required":["file"],"properties":{"name":{"type":"string","description":"Document filename."},"file":{"type":"string","description":"Base64-encoded PDF or image file."}}}},"submitters":{"type":"array","description":"Submitter roles for a newly generated template.","items":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string"}}}},"fields":{"type":"array","description":"Optional fixed fields for newly generated templates.","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string"},"role":{"type":"string"},"required":{"type":"boolean"},"readonly":{"type":"boolean"},"title":{"type":"string"},"description":{"type":"string"},"default_value":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"preferences":{"type":"object"},"options":{"type":"array","items":{"type":"object","properties":{"value":{"type":"string"}}}},"areas":{"type":"array","items":{"type":"object","required":["x","y","w","h"],"properties":{"x":{"type":"number","description":"Left coordinate from 0 to 1."},"y":{"type":"number","description":"Top coordinate from 0 to 1."},"w":{"type":"number","description":"Width from 0 to 1."},"h":{"type":"number","description":"Height from 0 to 1."},"page":{"type":"integer","description":"Zero-based page number."},"document":{"type":"integer","description":"Zero-based document index."},"option":{"type":"string","description":"Option value or index for radio/multiple fields."}}}}}}},"custom_fields":{"type":"array","maxItems":200,"description":"Optional application-owned field palette. Maximum 8 KB serialized JSON. Entries can be placed but cannot be renamed, edited, deleted or reordered in the embed. Omit to open without a palette.","items":{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1,"maxLength":120},"type":{"type":"string","default":"text","enum":["text","signature","initials","date","number","image","checkbox","multiple","file","radio","select","cells","stamp"]},"role":{"type":"string","maxLength":120},"title":{"type":"string","maxLength":120}}}}},"oneOf":[{"title":"Edit an existing template","required":["template_id"],"not":{"anyOf":[{"required":["clone_template_id"]},{"required":["documents"]}]}},{"title":"Clone a saved template","required":["clone_template_id"],"not":{"anyOf":[{"required":["template_id"]},{"required":["documents"]}]}},{"title":"Create from generated documents","required":["documents"],"not":{"anyOf":[{"required":["template_id"]},{"required":["clone_template_id"]}]}},{"title":"Clone and replace with generated documents","required":["clone_template_id","documents"],"not":{"required":["template_id"]}}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","template_id","name","status","builder_src","template","signing_session_url","created_at","updated_at","expires_at"],"properties":{"id":{"type":"integer","description":"Builder session ID. This is the underlying template ID."},"template_id":{"type":"integer","description":"Template ID opened by the embedded builder."},"name":{"type":"string","description":"Template name."},"external_id":{"type":"string","nullable":true,"description":"Application-specific external ID supplied when creating the builder session."},"status":{"type":"string","enum":["needs_fields","ready"],"description":"ready means the template currently has fields and can be used for signing."},"builder_src":{"type":"string","description":"Short-lived URL to iframe in the CRM template builder."},"template":{"type":"object","description":"Serialized EsignCenter template object."},"signing_session_url":{"type":"string","description":"API URL to create an embedded signing session for this template."},"created_at":{"type":"string","description":"Template creation timestamp."},"updated_at":{"type":"string","description":"Template update timestamp."},"expires_at":{"type":"string","description":"Date and time when the builder_src token expires."}}}}}},"422":{"description":"Invalid request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}},"/template_builder_sessions/{id}":{"get":{"security":[{"AuthToken":[]}],"tags":["Template Builder Sessions"],"summary":"Get template builder session status","description":"Returns current template builder status and a fresh short-lived builder_src for an existing builder session template.","operationId":"getTemplateBuilderSession","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"description":"Template ID returned by createTemplateBuilderSession."}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","template_id","name","status","builder_src","template","signing_session_url","created_at","updated_at","expires_at"],"properties":{"id":{"type":"integer","description":"Builder session ID. This is the underlying template ID."},"template_id":{"type":"integer","description":"Template ID opened by the embedded builder."},"name":{"type":"string","description":"Template name."},"external_id":{"type":"string","nullable":true,"description":"Application-specific external ID supplied when creating the builder session."},"status":{"type":"string","enum":["needs_fields","ready"],"description":"ready means the template currently has fields and can be used for signing."},"builder_src":{"type":"string","description":"Short-lived URL to iframe in the CRM template builder."},"template":{"type":"object","description":"Serialized EsignCenter template object."},"signing_session_url":{"type":"string","description":"API URL to create an embedded signing session for this template."},"created_at":{"type":"string","description":"Template creation timestamp."},"updated_at":{"type":"string","description":"Template update timestamp."},"expires_at":{"type":"string","description":"Date and time when the builder_src token expires."}}}}}}}}},"/user":{"get":{"security":[{"AuthToken":[]}],"tags":["Account"],"summary":"Get the current user","operationId":"getUser","description":"The API endpoint returns the user the API token belongs to. It is the cheapest way to check that a token works: every other endpoint in this reference acts on that user's account. A valid token on an account whose plan does not include the API is refused here with 403, like every other endpoint - a 403 means the plan, not the token.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","required":["id","first_name","last_name","email"],"properties":{"id":{"type":"integer","description":"Unique identifier of the user."},"first_name":{"type":"string","nullable":true,"description":"First name of the user."},"last_name":{"type":"string","nullable":true,"description":"Last name of the user."},"email":{"type":"string","format":"email","description":"Email address of the user."}}}}}},"401":{"description":"Unauthorized - no token was presented, the token is not a token of this instance, or the account it belongs to is no longer active."},"403":{"description":"Forbidden - the API is not included in this account's plan. The token itself is valid."}}}},"/template_preview_sessions":{"post":{"security":[{"AuthToken":[]}],"tags":["Template Preview Sessions"],"summary":"Create a read-only embedded template preview","description":"Creates an expiring iframe URL for a template owned by the API account without creating a submission or signer. Paid customer and internal integration accounts may use it. The preview and its consent PDF are revoked when the account is suspended, archived, or loses embedding access. Keep the API token on the server. Use synthetic values: the signed URL payload is readable.","operationId":"createTemplatePreviewSession","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["template_id","embed_origin"],"properties":{"template_id":{"type":"integer"},"embed_origin":{"type":"string","description":"Exact HTTPS origin allowed to frame the preview; localhost HTTP is permitted in development."},"expires_in_minutes":{"type":"integer","minimum":1,"default":120,"description":"Requested lifetime, capped at 1440 minutes."},"values":{"type":"object","maxProperties":200,"additionalProperties":{"type":"string"},"description":"Synthetic sample values keyed by field name or UUID; maximum 4096 bytes serialized JSON. Unknown and attachment-backed fields are ignored."}}}}}},"responses":{"200":{"description":"Preview session created","content":{"application/json":{"schema":{"type":"object","required":["id","token","template_id","name","preview_src","embed_origin","expires_at"],"properties":{"id":{"type":"string","description":"Signed preview token, also returned as token."},"token":{"type":"string"},"template_id":{"type":"integer"},"name":{"type":"string"},"preview_src":{"type":"string","format":"uri","description":"Expiring bearer URL to iframe; share only with authorized viewers."},"embed_origin":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Not authenticated","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"403":{"description":"Account inactive or embedding not entitled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"404":{"description":"Template not found in this account","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"422":{"description":"Invalid preview parameters","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}},"429":{"description":"Too many requests","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}}}}}}}}}}