Skip to main content

Template

A Template is a reusable definition of a Legalesign document. It contains roles for each participant and elements (fields) for signatures, text inputs, and other form data. Templates belong to a Group and are used to create Documents.

The link field provides a short-lease URL (expires after 60 seconds) to download the background PDF. Links are only provided when querying a single template, not in list queries.

Fields

FieldTypeDescription
idID!Unique identifier
titleString!Title as it appears in emails and the console
pageCountInt!Total number of pages
pageDimensionsAWSJSONJSON array of width/height pairs per page
fileNameStringBackground PDF filename
linkStringShort-lease URL to download the PDF (single query only)
autoArchiveBooleanAutomatically archive after sending
validBooleanWhether fields have been confirmed as valid
lockedBooleanWhether the template is locked for editing
fixSignatureScaleBooleanScale signatures to 1:3.88 ratio
tags[String]Tags for categorisation
groupIdIDThe owning group's ID
canOpenSignBooleanConfigured for direct link / agent app use
archivedBooleanWhether the template is archived
createdByStringUser who created the template
lastSentAWSDateTimeLast time this template was sent
createdAWSDateTimeWhen the template was created
modifiedAWSDateTimeWhen the template was last modified
retentionFloatExpiry datetime in epoch seconds
documentRetentionDaysIntDays to retain signed documents created from this template

Relationships

FieldTypeDescription
roles[Role]Roles needed to complete this template (signer, witness, approver)
directLinks[DirectLink]Direct signing links for this template
elementConnectionTemplateElementConnectionFields, labels, and other elements on the template
userSignatureConnectionUserSignatureElementConnectionUser signature placements

Query

query GetTemplate($id: ID!) {
template(id: $id) {
id
title
pageCount
valid
locked
link
}
}

Templates are also accessed via Group.templateConnection — see How Pagination Works.

templateConnection Arguments

When querying templates through a group:

ArgumentTypeDefaultDescription
firstIntNumber of items to return
afterIDCursor for forward pagination
archivedBooleanfalseInclude archived templates
searchStringnullSearch by template title
statusStringnullFilter by status

Example

A full template detail query (based on the Legalesign Console app):

query GetTemplateDetails {
template(id: "dHBsYjQ5YTg5NWQtYWRhMy0xMWYwLWIxZGMtMDY5NzZlZmU0MzIx") {
id
title
fileName
pageDimensions
pageCount
link
valid
locked
autoArchive
archived
tags
created
createdBy
lastSent
fixSignatureScale
roles {
id
name
signerIndex
}
elementConnection {
templateElements {
id
elementType
ax
ay
bx
by
page
label
optional
role
signer
validation
value
}
totalCount
}
}
}

Export This Article

Save a copy of this page as PDF or plain text.