Overview
Auto templates in iinked Sign allow users to create document templates that can be automatically detected and
applied to a document when creating a new signing package. This feature helps streamline the signing process by predefining
templated fields for commonly used documents within your organization.
You can also manually apply an auto template when creating packages via the API by specifying the autoTemplateCode for any document.
Using auto templates is especially useful when your packages contain documents that can vary, because you can choose which auto template to apply to each document individually.
Steps
Get the auto template code
To apply an auto template to a document when creating a package, you need to obtain the autoTemplateCode for the desired template.
You can find this code in the auto template editor within iinked Sign. It appears in the Auto Template Document panel under each document.You can also retrieve a list of auto templates by calling the templates/list endpoint and filtering the results to only include auto templates.GET /templates/list
{
"memberId": null,
"types": [
"auto_template"
],
"take": 100,
"skip": 0
}
See the Templates list API for more information. Create package using the auto template
Once you have the autoTemplateCode, you can create a new package by calling the packages/add endpoint and
specifying the autoTemplateCode for each document. Using code
Using auto
Using IDs
POST /packages/add
{
"name": "From Auto Template Code",
"type": "concurrent",
"state": "open",
"signers": [
{
"templateRole": "Signer 1",
"firstName": "Signer",
"lastName": "One",
"email": "signer@example.com",
"mobileNumber": null
}
],
"documents": [
{
"autoTemplateCode": "agreements:agreement123",
"fileName": "agreement.pdf",
"fileId": "{{file_id}}"
}
]
}
You can also use the special auto value for the autoTemplateCode field. This instructs iinked Sign to automatically
detect and apply any matching auto template based on the document name or content.POST /packages/add
{
"name": "From Auto Template Code",
"type": "concurrent",
"state": "open",
"signers": [
{
"templateRole": "Signer 1",
"firstName": "Signer",
"lastName": "One",
"email": "signer@example.com",
"mobileNumber": null
}
],
"documents": [
{
"autoTemplateCode": "auto",
"fileName": "agreement.pdf",
"fileId": "{{file_id}}"
}
]
}
Alternatively, you can specify the autoTemplateId and autoTemplateDocumentId directly for more precise control.POST /packages/add
{
"name": "From Auto Template Code",
"type": "concurrent",
"state": "open",
"signers": [
{
"templateRole": "Signer 1",
"firstName": "Signer",
"lastName": "One",
"email": "signer@example.com",
"mobileNumber": null
}
],
"documents": [
{
"autoTemplateId": "{{auto_template_id}}",
"autoTemplateDocumentId": "{{auto_template_document_id}}",
"fileName": "agreement.pdf",
"fileId": "{{file_id}}"
}
]
}