About this endpoint
What it does
Validates a .docx template and checks it against optional input data. It returns whether the template parsed successfully, plus details about template variables, unused input keys, undefined variables, and any syntax errors.
Request Body
| Parameter | Type | Description |
|---|---|---|
| template | String | The .docx template to inspect. |
| data | String | Optional JSON object to check against the template's variables. Can be null. |
Response
Returns a JSON object with ok as a boolean field, engine as a string field, unused, undefined, and variables as string array fields, and syntax_errors as an array field of objects containing line as an integer and message as a string. ok is false when the template has syntax errors.
| Parameter | Type | Description |
|---|---|---|
| ok | Boolean | false when the template has syntax errors. |
| engine | String | Template engine name. |
| unused | String Array | Keys of data no tag reads. |
| undefined | String Array | Variables data does not provide. |
| variables | String Array | Top-level names the template reads. |
| syntax_errors | Object Array | Syntax errors found in the template, as objects with line and message fields. |
Notes
The request body is unwrapped from the parser’s internal body envelope, so callers should send template and data as top-level body fields, not nested under a body object.



