Templates
Templates are single documents (PDF or HTML) with configurable fields that enable dynamic document generation within SignStack. They serve as reusable document definitions for creating personalized PDFs by mapping data from entities to fillable fields, signature fields, and other interactive elements.
Entities are structured data objects that conform to your schemas — think of them as the data sources that populate your template fields. For example, a real estate purchase agreement template might use entities like "buyer" (with name, email, address), "seller" (with contact details), "property" (with address, price, details), and "offer" (with terms and conditions). Each template has three main components: entity slots (which specify what data is needed), fields (which define where and how data appears on the PDF, with optional JSONata expressions that run on entity data to calculate field values or control field visibility), and roles (which define participants in e-signature workflows).
Templates follow the standard SignStack resource lifecycle: iterate in a draft, then publish to an immutable semver. Published versions are frozen so workflows that rendered against 1.0.0 keep rendering the exact same document, even after 2.0.0 ships; to make changes, edit the draft and publish again.
Templates can be previewed directly within SignStack using scenarios, and can be rendered into final documents either standalone or as part of blueprints and workflows for document generation and e-signature processes.
- get/v1/orgs/{orgId}/namespaces/{namespaceKey}/templates
- post/v1/orgs/{orgId}/namespaces/{namespaceKey}/templates
- post/v1/orgs/{orgId}/namespaces/{namespaceKey}/templates/render
- get/v1/orgs/{orgId}/namespaces/{namespaceKey}/templates/{key}
- get/v1/orgs/{orgId}/namespaces/{namespaceKey}/templates/{key}/versions
- put/v1/orgs/{orgId}/namespaces/{namespaceKey}/templates/{key}/versions/{version}
- delete/v1/orgs/{orgId}/namespaces/{namespaceKey}/templates/{key}/versions/{version}
- post/v1/orgs/{orgId}/namespaces/{namespaceKey}/templates/{key}/versions/{version}/publish
