Create a template

View as Markdown

Creates a library template from a multipart upload (file + name + description + optional binding). The optional kind field selects the DOCX/Liquid path (synchronous engine lint) or the pdf-form blank-form path (AcroForm parse, no lint). Requires playbook:create.

Authentication

AuthorizationBearer

WorkOS session JWT or an organization API key, sent as Authorization: Bearer <token>.

Request

The template file and its metadata.
filefileRequired

The template file (DOCX/Liquid or a blank PDF form).

namestringRequired
Template name.
descriptionstringOptional
Optional description.
kindenumOptional

Upload path; defaults to the DOCX/Liquid engine.

Allowed values:
bindingstringOptional
Optional JSON binding descriptor.

Response

The created template.
templateobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
422
Unprocessable Entity Error
503
Service Unavailable Error