TemplateSpec
The template's content. type is required — pdf or html — and determines the rendering pipeline:
pdf— overlays declaredfields(signature placements, text fields, checkboxes, etc.) onto the underlying PDF asset (contentKey+contentVersion). Field values come from JSONata expressions evaluated against the supplied inputs.html— the underlying HTML asset is a Handlebars template. The supplied inputs first run through the JSONata expression inspec.data.transformto produce a viewModel — the data context Handlebars renders against. The compiled HTML is then converted to a PDF.
The remaining fields configure which entity inputs the template needs (inputs), what signing roles it exposes (roles), and which JSONata functions it can call (functions). Templates are the building blocks of blueprint envelopes.
- typeType: stringenumrequired
Template kind.
pdfoverlays fields on a PDF asset;htmlrenders an HTML template (with an optional data transform).values- pdf
- html
- contentType: string
Key Asset key for the underlying PDF or HTML content. Pair with
contentVersion. - contentType: string
Version Specific version of the content asset to use.
- dataType: object
HTML-only. Configures the input → viewModel transform. The
transformJSONata expression reshapes raw entity inputs into the data context the underlying Handlebars template renders against. SeeHtmlDataConfig.- transformType: stringrequired
JSONata expression evaluated over the supplied inputs. The result becomes the viewModel — the object Handlebars references in the HTML via
{{...}}syntax (e.g.{{candidate.fullName}},{{#each items}}...{{/each}}). If the expression returns a non-object, it's wrapped as{ "data": <result> }automatically.
- fieldsType: array object[] · TemplateFieldInfo[]
Field placements on the rendered output (signature, text, checkbox, image, etc.). Each field declares its position, dimensions, optional default value (literal or expression), and optional role assignment.
- keyType: stringrequired
Unique identifier for the field
- typeType: stringenumrequired
Type of the field (form field or e-signature field)
values- text
_field - check
_box - image
- line
- signature
- initial
- signed
_date
- widgetsType: array object[]required
Visual elements representing this field in the PDF
- assignmentType: object
Assignment for the field, indicating which participant should fill this field
- includeType: string
If Optional JSONata expression to control field visibility
- value
Optional literal value or JSONata expression to dynamically calculate field value from entity data
- Type: string
Optional literal value or JSONata expression to dynamically calculate field value from entity data
- functionsType: array object[]
JSONata functions referenced by expressions inside this template. Each entry pins a specific function key + version, with an optional alias used at call sites.
- functionType: string
Key requiredResource key of the JSONata function being referenced.
- functionType: string
Version requiredSpecific version of the function being pinned (semver or
draft). - aliasType: string
Pattern: ^[a-z][a-zA-Z0-9]*$Optional name used in JSONata expressions to invoke this function as
$<alias>(...). Defaults tofunctionKeywhen omitted.
- inputsType: array object[] · Input[]
Entity inputs the caller (or parent blueprint) must supply when rendering this template.
- keyType: stringrequired
Unique identifier for this input
- requiredrequired
Whether this entity slot must be populated (boolean literal or JSONata expression)
- Type: boolean
Whether this entity slot must be populated (boolean literal or JSONata expression)
- schemaType: string
Key requiredKey of the schema that defines this entity's structure
- schemaType: string
Version requiredSchema version. Either a semantic version (e.g.
1.2.0) ordraftwhile the parent blueprint is itself a draft. - descriptionType: string
Description of what this input represents
- nameType: string
Human-readable name for this input
- rolesType: array object[] · TemplateRole[]
Signing roles declared by this template. Blueprint participants get assigned to these roles via document assignments at the orchestration step level.
- keyType: stringrequired
Unique identifier for the role
- nameType: string
Human-readable name for the role
- roleType: string
Category Category or type of role (e.g., 'Signer', 'Approver')
