v1

latestSwagger 2.02026-07-134026156.7 KB
Templates

Create a new HTML template

Creates a new HTML template using HTML, CSS/SCSS, and Liquid templating. Allows complete control over PDF layout and styling. Supports headers, footers, and dynamic content using Liquid syntax for field values, conditions, loops, and filters.

post/templates?endpoint_variant=create_html_template

Request body

Example request

{
  "template": {
    "name": "Test HTML Template",
    "description": "HTML template created via API",
    "template_type": "html",
    "html": "<html><body><p>Test Content</p></body></html>",
    "scss": "body { color: #444; }",
    "header_html": "Test Header",
    "footer_html": "Test Footer"
  }
}

Response

returns a created template

add_data_request_submission_id_footersboolean required
allow_additional_propertiesboolean required
descriptionstring nullable required
document_filenamestring nullable required
document_md5string nullable required
document_parse_errorboolean required
document_processedboolean required
document_state'pending' | 'processed' | 'password_required' | 'malformed_pdf' | 'unknown_error' required
document_urlstring nullable required
editable_submissionsboolean required
embed_domainsstring nullable required
embed_edit_allow_settingsboolean required
embed_edit_allow_versioningboolean required
embed_edit_allow_document_replacementboolean required
encrypt_pdfs_passwordstring nullable required
encrypt_pdfsboolean required
expiration_intervalstring required
expire_afterinteger required
expire_submissionsboolean required
external_predefined_fields_template_idstring nullable required
external_predefined_fields_template_namestring nullable required
first_templateboolean required
idstring nullable required
lockedboolean required
merge_audit_trail_pdfboolean required
namestring nullable required
page_countinteger required
parent_folder_idstring nullable required
pathstring nullable required
permanent_document_urlstring nullable required
public_submissionsboolean required
public_web_formboolean required
redirect_urlstring nullable required
slack_webhook_urlstring nullable required
template_type'pdf' | 'html' required
updated_atstring nullable required
version_published_atstring nullable required
versionstring nullable required
webhook_urlstring nullable required
embed_edit_tokenstring nullable
demoboolean required
latest_versionstring nullable required
last_changed_atstring nullable required
last_changed_by_type'user' | 'api' | 'external_user' nullable required
last_changed_by_idstring nullable required
last_changed_by_external_namestring nullable required
last_changed_by_external_emailstring nullable required
last_changed_by_external_idstring nullable required