---
title: "Template Error"
description: "The server could not parse a DOCX template. Fix unbalanced {{ }} placeholders, missing conditional tags, or stray curly braces and retry."
canonical: "https://signatureapi.com/docs/v1/errors/template-error"
source: "https://signatureapi.com/docs/v1/errors/template-error.md"
last_verified_api_version: "1.18.0"
last_modified: "2026-11-18T11:41:57Z"
---

# Template Error

The server could not parse a DOCX template. Fix unbalanced {{ }} placeholders, missing conditional tags, or stray curly braces and retry.

_Last verified against API version 1.18.0._

## What Happened

The server could not parse a document as a template. This often happens when the fields (placeholders, conditionals, etc.) are not formatted correctly.

> **Tip:** The response includes a `detail` property with more information about this error.

## Example response

```json 422 Unprocessable Content (application/problem+json)
{
  "type": "https://signatureapi.com/docs/v1/errors/template-error",
  "title": "Template Error",
  "status": 422,
  "detail": "documents[0] could not be parsed as a template."
}
```

## How to Fix

- Check the `detail` property in the error response for the specific parsing issue.
- Verify that all [field placeholders](https://signatureapi.com/docs/api/resources/documents/templates#fields) use matching opening `{{` and closing `}}` braces.
- Verify that all [conditionals](https://signatureapi.com/docs/api/resources/documents/templates#conditionals) have both opening and closing tags.
- Ensure there are no stray or unescaped curly braces in the template text.
- If the DOCX file was edited in Google Docs or LibreOffice, formatting artifacts may split placeholder syntax across multiple runs. Open the file in Microsoft Word and re-type the placeholders.

Still stuck? [Contact support](https://signatureapi.com/support).
