SealRoute Docs
  • Get Started
  • API Reference
  • SDKs
  • Guides
  • Webhooks
Information
Submissions
    List all submissionsgetCreate a submissionpostGet a submissiongetArchive a submissiondeleteGet submission documentsgetCreate submissions from emailspostCreate a submission from PDFpostCreate a submission from DOCXpostCreate a submission from HTMLpost
Submitters
    Get a submittergetUpdate a submitterputList all submittersget
Templates
    List all templatesgetGet a templategetUpdate a templateputArchive a templatedeleteUpdate template documentsputClone a templatepostCreate a template from HTMLpostCreate a template from Word DOCXpostCreate a template from PDFpostMerge templatespost
powered by Zudoku
SealRoute API
SealRoute API

Templates

Templates represent reusable document signing forms with fields and signatures to be collected. It's possible to create unique template forms with fields and signatures using HTML or with tagged PDFs.


List all templates

GET
https://sealroute.com
/templates

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

List all templates › query Parameters

q
​string

Filter templates based on the name partial match.

slug
​string

Filter templates by unique slug.

external_id
​string

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.

folder
​string

Filter templates by folder name.

archived
​boolean

Get only archived templates instead of active ones.

limit
​integer

The number of templates to return. Default value is 10. Maximum value is 100.

after
​integer

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.

before
​integer

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.

List all templates › Responses

200

OK

​object[] · required

List of templates.

​object · required
GET/templates
curl --request GET \ --url https://sealroute.com/templates
shell
Example Responses
{ "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://sealroute.com/file/hash/sample-document.pdf", "preview_image_url": "https://sealroute.com/file/hash/0.jpg", "filename": "example-document.pdf" } ] } ], "pagination": { "count": 1, "next": 1, "prev": 2 } }
json
application/json

Get a template

GET
https://sealroute.com
/templates/{id}

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

Get a template › path Parameters

id
​integer · required

The unique identifier of the document template.

Get a template › Responses

200

OK

id
​integer · required

Unique identifier of the document template.

slug
​string · required

Unique slug of the document template.

name
​string · required

Name of the template.

preferences
​object · required

Template preferences.

​object[] · required

List of documents attached to the template.

​object[] · required

List of fields to be filled in the template.

​object[] · required
author_id
​integer · required

Unique identifier of the author of the template.

archived_at
​string | null · required

Date and time when the template was archived.

created_at
​string · required

Date and time when the template was created.

updated_at
​string · required

Date and time when the template was updated.

source
​string · enum · required

Source of the template.

Enum values:
native
api
embed
external_id
​string | null · required

Identifier of the template in the external system.

folder_id
​integer · required

Unique identifier of the folder where the template is placed.

folder_name
​string · required

Folder name where the template is placed.

​object · required
​object[] · required

List of documents attached to the template.

shared_link
​boolean

Indicates if the template is accessible by link.

GET/templates/{id}
curl --request GET \ --url https://sealroute.com/templates/:id
shell
Example Responses
{ "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://sealroute.com/file/hash/sample-document.pdf", "preview_image_url": "https://sealroute.com/file/hash/0.jpg", "filename": "example-document.pdf" } ] }
json
application/json

Update a template

PUT
https://sealroute.com
/templates/{id}

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

Update a template › path Parameters

id
​integer · required

The unique identifier of the document template.

Update a template › Request Body

name
​string

The name of the template

Example: New Document Name
folder_name
​string

The folder's name to which the template should be moved.

Example: New Folder
roles
​string[]

An array of submitter role names to update the template with.

Example: ["Agent","Customer"]
archived
​boolean

Set false to unarchive template.

Update a template › Responses

200

OK

id
​integer · required

Template unique ID number.

updated_at
​string · required

Date and time when the template was last updated.

PUT/templates/{id}
curl --request PUT \ --url https://sealroute.com/templates/:id \ --header 'Content-Type: application/json' \ --data ' { "name": "New Document Name", "folder_name": "New Folder", "roles": [ "Agent", "Customer" ], "archived": true } '
shell
Example Request Body
{ "name": "New Document Name", "folder_name": "New Folder", "roles": [ "Agent", "Customer" ], "archived": true }
json
Example Responses
{ "id": 1, "updated_at": "2023-12-14T15:50:21.799Z" }
json
application/json

Archive a template

DELETE
https://sealroute.com
/templates/{id}

The API endpoint allows you to archive a document template.

Archive a template › path Parameters

id
​integer · required

The unique identifier of the document template.

Archive a template › Responses

200

OK

id
​integer · required

Template unique ID number.

archived_at
​string | null · required

Date and time when the template was archived.

DELETE/templates/{id}
curl --request DELETE \ --url https://sealroute.com/templates/:id
shell
Example Responses
{ "id": 1, "archived_at": "2023-12-14T15:50:21.799Z" }
json
application/json

Update template documents

PUT
https://sealroute.com
/templates/{id}/documents

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

Update template documents › path Parameters

id
​integer · required

The unique identifier of the documents template.

Update template documents › Request Body

​object[]

The list of documents to add or replace in the template.

merge
​boolean

Set to true to merge all existing and new documents into a single PDF document in the template.

Default: false

Update template documents › Responses

200

OK

id
​integer · required

Unique identifier of the document template.

slug
​string · required

Unique slug of the document template.

name
​string · required

Name of the template.

preferences
​object · required

Template preferences.

​object[] · required

List of documents attached to the template.

​object[] · required

List of fields to be filled in the template.

​object[] · required
author_id
​integer · required

Unique identifier of the author of the template.

archived_at
​string | null · required

Date and time when the template was archived.

created_at
​string · required

Date and time when the template was created.

updated_at
​string · required

Date and time when the template was updated.

source
​string · enum · required

Source of the template.

Enum values:
native
api
embed
external_id
​string | null · required

Identifier of the template in the external system.

folder_id
​integer · required

Unique identifier of the folder where the template is placed.

folder_name
​string · required

Folder name where the template is placed.

​object · required
​object[] · required

List of documents attached to the template.

shared_link
​boolean

Indicates if the template is accessible by link.

PUT/templates/{id}/documents
curl --request PUT \ --url https://sealroute.com/templates/:id/documents \ --header 'Content-Type: application/json' \ --data ' { "documents": [ { "name": "Test Template", "file": "file", "html": "html", "position": 0, "replace": false, "remove": false } ], "merge": false } '
shell
Example Request Body
{ "documents": [ { "name": "Test Template", "file": "file", "html": "html", "position": 0, "replace": false, "remove": false } ], "merge": false }
json
Example Responses
{ "id": 3, "slug": "ZQpF222rFBv71q", "name": "Demo Template", "schema": [ { "name": "Demo Template", "attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5" } ], "fields": [ { "name": "Name", "required": false, "type": "text", "uuid": "a06c49f6-4b20-4442-ac7f-c1040d2cf1ac", "submitter_uuid": "93ba628c-5913-4456-a1e9-1a81ad7444b3", "areas": [ { "page": 0, "attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5", "x": 0.403158189124654, "y": 0.04211750189825361, "w": 0.100684625476058, "h": 0.01423690205011389 } ] } ], "submitters": [ { "name": "Submitter", "uuid": "93ba628c-5913-4456-a1e9-1a81ad7444b3" } ], "author_id": 1, "archived_at": null, "created_at": "2023-12-14T15:50:21.799Z", "updated_at": "2023-12-14T15:50:21.799Z", "source": "api", "folder_id": 1, "folder_name": "Default", "external_id": "f0b4714f-e44b-4993-905b-68b4451eef8c", "author": { "id": 1, "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com" }, "documents": [ { "id": 3, "uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5", "url": "https://sealroute.com/file/hash/Test%20Template.pdf" } ] }
json
application/json

Clone a template

POST
https://sealroute.com
/templates/{id}/clone

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

Clone a template › path Parameters

id
​integer · required

The unique identifier of the documents template.

Clone a template › Request Body

name
​string

Template name. Existing name with (Clone) suffix will be used if not specified.

Example: Cloned Template
folder_name
​string

The folder's name to which the template should be cloned.

external_id
​string

Your application-specific unique string key to identify this template within your app.

Clone a template › Responses

200

OK

id
​integer · required

Unique identifier of the document template.

slug
​string · required

Unique slug of the document template.

name
​string · required

Name of the template.

preferences
​object · required

Template preferences.

​object[] · required

List of documents attached to the template.

​object[] · required

List of fields to be filled in the template.

​object[] · required
author_id
​integer · required

Unique identifier of the author of the template.

archived_at
​string | null · required

Date and time when the template was archived.

created_at
​string · required

Date and time when the template was created.

updated_at
​string · required

Date and time when the template was updated.

source
​string · enum · required

Source of the template.

Enum values:
native
api
embed
external_id
​string | null · required

Identifier of the template in the external system.

folder_id
​integer · required

Unique identifier of the folder where the template is placed.

folder_name
​string · required

Folder name where the template is placed.

​object · required
​object[] · required

List of documents attached to the template.

shared_link
​boolean

Indicates if the template is accessible by link.

POST/templates/{id}/clone
curl --request POST \ --url https://sealroute.com/templates/:id/clone \ --header 'Content-Type: application/json' \ --data ' { "name": "Cloned Template", "folder_name": "folder_name", "external_id": "external_id" } '
shell
Example Request Body
{ "name": "Cloned Template", "folder_name": "folder_name", "external_id": "external_id" }
json
Example Responses
{ "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://sealroute.com/file/hash/sample-document.pdf", "filename": "sample-document.pdf" } ] }
json
application/json

Create a template from HTML

POST
https://sealroute.com
/templates/html

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

Create a template from HTML › Request Body

html
​string · required

HTML template with field tags.

Example: <p>Lorem Ipsum is simply dummy text of the <text-field name="Industry" role="First Party" required="false" style="width: 80px; height: 16px; display: inline-block; margin-bottom: -4px"> </text-field> and typesetting industry</p>
html_header
​string

HTML template of the header to be displayed on every page.

html_footer
​string

HTML template of the footer to be displayed on every page.

name
​string

Template name. Random uuid will be assigned when not specified.

Example: Test Template
size
​string · enum

Page size. Letter 8.5 x 11 will be assigned when not specified.

Enum values:
Letter
Legal
Tabloid
Ledger
A0
A1
A2
A3
Example: A4
Default: Letter
external_id
​string

Your application-specific unique string key to identify this template within your app. Existing template with specified external_id will be updated with a new HTML.

Example: 714d974e-83d8-11ee-b962-0242ac120002
folder_name
​string

The folder's name to which the template should be created.

shared_link
​boolean

set to true to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.

Default: true
​object[]

The list of documents built from HTML. Can be used to create a template with multiple documents. Leave documents param empty when using a top-level html param for a template with a single document.

Create a template from HTML › Responses

200

OK

id
​integer · required

Unique identifier of the document template.

slug
​string · required

Unique slug of the document template.

name
​string · required

Name of the template.

preferences
​object · required

Template preferences.

​object[] · required

List of documents attached to the template.

​object[] · required

List of fields to be filled in the template.

​object[] · required
author_id
​integer · required

Unique identifier of the author of the template.

archived_at
​string | null · required

Date and time when the template was archived.

created_at
​string · required

Date and time when the template was created.

updated_at
​string · required

Date and time when the template was updated.

source
​string · enum · required

Source of the template.

Enum values:
native
api
embed
external_id
​string | null · required

Identifier of the template in the external system.

folder_id
​integer · required

Unique identifier of the folder where the template is placed.

folder_name
​string · required

Folder name where the template is placed.

​object · required
​object[] · required

List of documents attached to the template.

shared_link
​boolean

Indicates if the template is accessible by link.

POST/templates/html
curl --request POST \ --url https://sealroute.com/templates/html \ --header 'Content-Type: application/json' \ --data ' { "html": "<p>Lorem Ipsum is simply dummy text of the\n<text-field\n name=\"Industry\"\n role=\"First Party\"\n required=\"false\"\n style=\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\">\n</text-field>\nand typesetting industry</p>\n", "html_header": "html_header", "html_footer": "html_footer", "name": "Test Template", "size": "Letter", "external_id": "714d974e-83d8-11ee-b962-0242ac120002", "folder_name": "folder_name", "shared_link": true, "documents": [ { "html": "<p>Lorem Ipsum is simply dummy text of the\n<text-field\n name=\"Industry\"\n role=\"First Party\"\n required=\"false\"\n style=\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\">\n</text-field>\nand typesetting industry</p>\n", "name": "Test Document" } ] } '
shell
Example Request Body
{ "html": "<p>Lorem Ipsum is simply dummy text of the\n<text-field\n name=\"Industry\"\n role=\"First Party\"\n required=\"false\"\n style=\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\">\n</text-field>\nand typesetting industry</p>\n", "html_header": "html_header", "html_footer": "html_footer", "name": "Test Template", "size": "Letter", "external_id": "714d974e-83d8-11ee-b962-0242ac120002", "folder_name": "folder_name", "shared_link": true, "documents": [ { "html": "<p>Lorem Ipsum is simply dummy text of the\n<text-field\n name=\"Industry\"\n role=\"First Party\"\n required=\"false\"\n style=\"width: 80px; height: 16px; display: inline-block; margin-bottom: -4px\">\n</text-field>\nand typesetting industry</p>\n", "name": "Test Document" } ] }
json
Example Responses
{ "id": 3, "slug": "ZQpF222rFBv71q", "name": "Demo Template", "schema": [ { "name": "Demo Template", "attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5" } ], "fields": [ { "name": "Name", "required": false, "type": "text", "uuid": "a06c49f6-4b20-4442-ac7f-c1040d2cf1ac", "submitter_uuid": "93ba628c-5913-4456-a1e9-1a81ad7444b3", "areas": [ { "page": 0, "attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5", "x": 0.403158189124654, "y": 0.04211750189825361, "w": 0.100684625476058, "h": 0.01423690205011389 } ] } ], "submitters": [ { "name": "Submitter", "uuid": "93ba628c-5913-4456-a1e9-1a81ad7444b3" } ], "author_id": 1, "archived_at": null, "created_at": "2023-12-14T15:50:21.799Z", "updated_at": "2023-12-14T15:50:21.799Z", "source": "api", "folder_id": 1, "folder_name": "Default", "external_id": "f0b4714f-e44b-4993-905b-68b4451eef8c", "shared_link": true, "author": { "id": 1, "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com" }, "documents": [ { "id": 3, "uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5", "url": "https://sealroute.com/file/hash/Test%20Template.pdf" } ] }
json
application/json

Create a template from Word DOCX

POST
https://sealroute.com
/templates/docx

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

Create a template from Word DOCX › Request Body

​object[] · required
name
​string

Name of the template

Example: Test DOCX
external_id
​string

Your application-specific unique string key to identify this template within your app. Existing template with specified external_id will be updated with a new document.

Example: unique-key
folder_name
​string

The folder's name to which the template should be created.

shared_link
​boolean

set to true to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.

Default: true

Create a template from Word DOCX › Responses

200

OK

id
​integer · required

Unique identifier of the document template.

slug
​string · required

Unique slug of the document template.

name
​string · required

Name of the template.

preferences
​object · required

Template preferences.

​object[] · required

List of documents attached to the template.

​object[] · required

List of fields to be filled in the template.

​object[] · required
author_id
​integer · required

Unique identifier of the author of the template.

archived_at
​string | null · required

Date and time when the template was archived.

created_at
​string · required

Date and time when the template was created.

updated_at
​string · required

Date and time when the template was updated.

source
​string · enum · required

Source of the template.

Enum values:
native
api
embed
external_id
​string | null · required

Identifier of the template in the external system.

folder_id
​integer · required

Unique identifier of the folder where the template is placed.

folder_name
​string · required

Folder name where the template is placed.

​object · required
​object[] · required

List of documents attached to the template.

shared_link
​boolean

Indicates if the template is accessible by link.

POST/templates/docx
curl --request POST \ --url https://sealroute.com/templates/docx \ --header 'Content-Type: application/json' \ --data ' { "name": "Test DOCX", "external_id": "unique-key", "folder_name": "folder_name", "shared_link": true, "documents": [ { "name": "name", "file": "base64", "fields": [ { "name": "name", "type": "heading", "role": "role", "required": true, "title": "title", "description": "description", "areas": [ { "x": 0, "y": 0, "w": 0, "h": 0, "page": 0, "option": "option" } ], "options": [ "Option A", "Option B" ], "validation": { "pattern": "[A-Z]{4}", "message": "message", "min": 0, "max": 0, "step": 0 }, "preferences": { "font_size": 12, "font_type": "bold", "font": "Times", "color": "black", "background": "black", "align": "left", "valign": "center", "format": "DD/MM/YYYY", "price": 99.99, "currency": "USD", "mask": false, "reasons": [ "string" ] } } ] } ] } '
shell
Example Request Body
{ "name": "Test DOCX", "external_id": "unique-key", "folder_name": "folder_name", "shared_link": true, "documents": [ { "name": "name", "file": "base64", "fields": [ { "name": "name", "type": "heading", "role": "role", "required": true, "title": "title", "description": "description", "areas": [ { "x": 0, "y": 0, "w": 0, "h": 0, "page": 0, "option": "option" } ], "options": [ "Option A", "Option B" ], "validation": { "pattern": "[A-Z]{4}", "message": "message", "min": 0, "max": 0, "step": 0 }, "preferences": { "font_size": 12, "font_type": "bold", "font": "Times", "color": "black", "background": "black", "align": "left", "valign": "center", "format": "DD/MM/YYYY", "price": 99.99, "currency": "USD", "mask": false, "reasons": [ "string" ] } } ] } ] }
json
Example Responses
{ "id": 5, "slug": "s3ff992CoPjvaX", "name": "Demo PDF", "schema": [ { "name": "Demo PDF", "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf" } ], "fields": [ { "name": "Name", "type": "text", "required": true, "uuid": "d0bf3c0c-1928-40c8-80f9-d9f3c6ad4eff", "submitter_uuid": "0b0bff58-bc9a-475d-b4a9-2f3e5323faf7", "areas": [ { "page": 1, "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf", "x": 0.403158189124654, "y": 0.04211750189825361, "w": 0.100684625476058, "h": 0.01423690205011389 } ] } ], "submitters": [ { "name": "Submitter", "uuid": "0b0bff58-bc9a-475d-b4a9-2f3e5323faf7" } ], "author_id": 1, "archived_at": null, "created_at": "2023-12-14T15:50:21.799Z", "updated_at": "2023-12-14T15:50:21.799Z", "source": "api", "folder_id": 1, "folder_name": "Default", "external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5", "shared_link": true, "author": { "id": 1, "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com" }, "documents": [ { "id": 7, "uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf", "url": "https://sealroute.com/hash/DemoPDF.pdf" } ] }
json
application/json

Create a template from PDF

POST
https://sealroute.com
/templates/pdf

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

Create a template from PDF › Request Body

​object[] · required
name
​string

Name of the template

Example: Test PDF
folder_name
​string

The folder's name to which the template should be created.

external_id
​string

Your application-specific unique string key to identify this template within your app. Existing template with specified external_id will be updated with a new PDF.

Example: unique-key
shared_link
​boolean

set to true to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.

Default: true
flatten
​boolean

Remove PDF form fields from the documents.

Default: false
remove_tags
​boolean

Pass false to disable the removal of {{text}} tags from the PDF. This can be used along with transparent text tags for faster and more robust PDF processing.

Default: true

Create a template from PDF › Responses

200

OK

id
​integer · required

Unique identifier of the document template.

slug
​string · required

Unique slug of the document template.

name
​string · required

Name of the template.

preferences
​object · required

Template preferences.

​object[] · required

List of documents attached to the template.

​object[] · required

List of fields to be filled in the template.

​object[] · required
author_id
​integer · required

Unique identifier of the author of the template.

archived_at
​string | null · required

Date and time when the template was archived.

created_at
​string · required

Date and time when the template was created.

updated_at
​string · required

Date and time when the template was updated.

source
​string · enum · required

Source of the template.

Enum values:
native
api
embed
external_id
​string | null · required

Identifier of the template in the external system.

folder_id
​integer · required

Unique identifier of the folder where the template is placed.

folder_name
​string · required

Folder name where the template is placed.

​object · required
​object[] · required

List of documents attached to the template.

shared_link
​boolean

Indicates if the template is accessible by link.

POST/templates/pdf
curl --request POST \ --url https://sealroute.com/templates/pdf \ --header 'Content-Type: application/json' \ --data ' { "name": "Test PDF", "folder_name": "folder_name", "external_id": "unique-key", "shared_link": true, "documents": [ { "name": "name", "file": "base64", "fields": [ { "name": "name", "type": "heading", "role": "role", "required": true, "title": "title", "description": "description", "areas": [ { "x": 0, "y": 0, "w": 0, "h": 0, "page": 1, "option": "option" } ], "options": [ "Option A", "Option B" ], "validation": { "pattern": "[A-Z]{4}", "message": "message", "min": 0, "max": 0, "step": 0 }, "preferences": { "font_size": 12, "font_type": "bold", "font": "Times", "color": "black", "background": "black", "align": "left", "valign": "center", "format": "DD/MM/YYYY", "price": 99.99, "currency": "USD", "mask": false, "reasons": [ "string" ] } } ] } ], "flatten": false, "remove_tags": true } '
shell
Example Request Body
{ "name": "Test PDF", "folder_name": "folder_name", "external_id": "unique-key", "shared_link": true, "documents": [ { "name": "name", "file": "base64", "fields": [ { "name": "name", "type": "heading", "role": "role", "required": true, "title": "title", "description": "description", "areas": [ { "x": 0, "y": 0, "w": 0, "h": 0, "page": 1, "option": "option" } ], "options": [ "Option A", "Option B" ], "validation": { "pattern": "[A-Z]{4}", "message": "message", "min": 0, "max": 0, "step": 0 }, "preferences": { "font_size": 12, "font_type": "bold", "font": "Times", "color": "black", "background": "black", "align": "left", "valign": "center", "format": "DD/MM/YYYY", "price": 99.99, "currency": "USD", "mask": false, "reasons": [ "string" ] } } ] } ], "flatten": false, "remove_tags": true }
json
Example Responses
{ "id": 5, "slug": "s3ff992CoPjvaX", "name": "Demo PDF", "schema": [ { "name": "Demo PDF", "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf" } ], "fields": [ { "name": "Name", "type": "text", "required": true, "uuid": "d0bf3c0c-1928-40c8-80f9-d9f3c6ad4eff", "submitter_uuid": "0b0bff58-bc9a-475d-b4a9-2f3e5323faf7", "areas": [ { "page": 1, "attachment_uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf", "x": 0.403158189124654, "y": 0.04211750189825361, "w": 0.100684625476058, "h": 0.01423690205011389 } ] } ], "submitters": [ { "name": "Submitter", "uuid": "0b0bff58-bc9a-475d-b4a9-2f3e5323faf7" } ], "author_id": 1, "archived_at": null, "created_at": "2023-12-14T15:50:21.799Z", "updated_at": "2023-12-14T15:50:21.799Z", "source": "api", "folder_id": 1, "folder_name": "Default", "external_id": "c248ffba-ef81-48b7-8e17-e3cecda1c1c5", "shared_link": true, "author": { "id": 1, "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com" }, "documents": [ { "id": 7, "uuid": "48d2998f-266b-47e4-beb2-250ab7ccebdf", "url": "https://sealroute.com/file/hash/Demo%20PDF.pdf" } ] }
json
application/json

Merge templates

POST
https://sealroute.com
/templates/merge

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

Merge templates › Request Body

template_ids
​integer[] · required

An array of template ids to merge into a new template.

Example: [321,432]
name
​string

Template name. Existing name with (Merged) suffix will be used if not specified.

Example: Merged Template
folder_name
​string

The name of the folder in which the merged template should be placed.

external_id
​string

Your application-specific unique string key to identify this template within your app.

shared_link
​boolean

set to true to make the template available via a shared link. This will allow anyone with the link to create a submission from this template.

Default: true
roles
​string[]

An array of submitter role names to be used in the merged template.

Example: ["Agent","Customer"]

Merge templates › Responses

200

OK

id
​integer · required

Unique identifier of the document template.

slug
​string · required

Unique slug of the document template.

name
​string · required

Name of the template.

preferences
​object · required

Template preferences.

​object[] · required

List of documents attached to the template.

​object[] · required

List of fields to be filled in the template.

​object[] · required
author_id
​integer · required

Unique identifier of the author of the template.

archived_at
​string | null · required

Date and time when the template was archived.

created_at
​string · required

Date and time when the template was created.

updated_at
​string · required

Date and time when the template was updated.

source
​string · enum · required

Source of the template.

Enum values:
native
api
embed
external_id
​string | null · required

Identifier of the template in the external system.

folder_id
​integer · required

Unique identifier of the folder where the template is placed.

folder_name
​string · required

Folder name where the template is placed.

​object · required
​object[] · required

List of documents attached to the template.

shared_link
​boolean

Indicates if the template is accessible by link.

POST/templates/merge
curl --request POST \ --url https://sealroute.com/templates/merge \ --header 'Content-Type: application/json' \ --data ' { "template_ids": [ 321, 432 ], "name": "Merged Template", "folder_name": "folder_name", "external_id": "external_id", "shared_link": true, "roles": [ "Agent", "Customer" ] } '
shell
Example Request Body
{ "template_ids": [ 321, 432 ], "name": "Merged Template", "folder_name": "folder_name", "external_id": "external_id", "shared_link": true, "roles": [ "Agent", "Customer" ] }
json
Example Responses
{ "id": 6, "slug": "Xc7opTqwwV9P7x", "name": "Merged Template", "schema": [ { "attachment_uuid": "68aa0716-61f0-4535-9ba4-6c00f835b080", "name": "sample-document" } ], "fields": [ { "uuid": "93c7065b-1b19-4551-b67b-9946bf1c11c9", "submitter_uuid": "ad128012-756d-4d17-b728-6f6b1d482bb5", "name": "Name", "type": "text", "required": true, "areas": [ { "page": 0, "attachment_uuid": "09a8bc73-a7a9-4fd9-8173-95752bdf0af5", "x": 0.403158189124654, "y": 0.04211750189825361, "w": 0.100684625476058, "h": 0.01423690205011389 } ] } ], "submitters": [ { "name": "First Party", "uuid": "ad128012-756d-4d17-b728-6f6b1d482bb5" } ], "author_id": 1, "archived_at": null, "created_at": "2023-12-14T15:50:21.799Z", "updated_at": "2023-12-14T15:50:21.799Z", "source": "api", "folder_id": 2, "folder_name": "Default", "external_id": null, "shared_link": true, "author": { "id": 1, "first_name": "John", "last_name": "Doe", "email": "john.doe@example.com" }, "documents": [ { "id": 9, "uuid": "ded62277-9705-4fac-b5dc-58325d4102eb", "url": "https://sealroute.com/file/hash/sample-document.pdf", "filename": "sample-document.pdf" } ] }
json
application/json

Submitters