Actions55
- PDF Asset Actions
- PDF Engine Actions
- Signing Process Actions
- Template Actions
- Template Asset Actions
- Template Category Actions
- Template Tag Actions
- Webhook Actions
Template → Create
AI-generatedSummary
Create a new document template in SmartDocs, specifying its kind (PDF or HTML), name, and full JSON definition including metadata and content specifics.
Inputs
- kind (required) — The type of template to create, either 'PDF' or 'HTML'.
- name (required) — The unique name identifying the template.
- definition — A JSON object representing the full template configuration. This can include description, categoryId, tags, policies, source PDF asset ID (for PDFs), HTML/CSS/sample data/page layout (for HTML), signer roles, input schema, field prefills, and signing fields.
Output shape
a single JSON object representing the created template with its assigned ID and details as returned by the SmartDocs API.
The operation sends a POST request to '/templates' with merged parameters and returns the created template data. The output does not support binary data, only JSON response is returned.
Examples
Example 1: Create a new PDF template with a specified name and detailed JSON configuration.
Provide 'kind' as 'PDF', specify 'name' e.g. 'Contract Template', and a JSON definition with relevant keys such as 'description' and 'sourcePdfAssetId'.