---
"@context": https://schema.org
"@type": TechArticle
"@id": https://www.twilio.com/docs/api/errors/11320#article
headline: "11320: Invalid template unclosed brackets"
url: https://www.twilio.com/docs/api/errors/11320
inLanguage: en
dateModified: 2026-06-09T11:00:42.000Z
author:
  "@type": Organization
  name: Twilio Developer Education Team
publisher:
  "@type": Organization
  name: Twilio
---

# 11320: Invalid template unclosed brackets

Log Level: ERROR

## Description

This error occurs when your URL template is not formatted correctly. Check the template for unmatched variable brackets, especially in `media` or button `url` fields that use Content API variables.

### Possible causes

* A variable placeholder in a URL starts with `{{` but does not end with `}}`.
* A media URL or URL button was edited manually and left unmatched brackets in the template string.
* A sample URL path was added incorrectly when inserting variables into a URL-based field.

### Possible solutions

* Review each templated URL and make sure every opening `{{` has a matching closing `}}`.
* Use supported variable placeholders such as `{{1}}` or `{{IdName}}`. Do not include spaces inside variable names.
* If the URL uses variables in `media` or `url`, provide a valid sample value in the `variables` object so the combined URL resolves to a publicly accessible file or website.
* Save the corrected template in Console or resend the corrected Content API request.

#### Additional resources

* [Using Variables with Content Templates](/docs/content/using-variables-with-content-api)
* [Create templates with the Content Template Builder in Console](/docs/content/create-templates-with-the-content-template-builder)
* [twilio/card content type](/docs/content/twiliocard)
