Skip to main content

template_render_failed

The template exists and was loaded, but it could not be turned into a finished message with the template_data in your request. Nothing was sent and nothing was charged.

Status: 422

{
"status": 422,
"type": "template_render_failed",
"message": "failed to render template: ...",
"request_id": "req_01J8K2P...",
"doc_url": "https://docs.epostix.com/errors/template_render_failed"
}

message wraps the underlying rendering failure, so its wording varies with the cause. Read it, but branch on type.

Why you got this​

  • A variable the template references is absent from template_data.
  • A value has a shape the template cannot use, such as an object where text is expected, or text where a list is looped over.
  • The template markup is malformed: an unclosed tag or an unbalanced block.
  • One email in a batch carries a template_data object the others do not, so it fails while the rest render.

How to fix it​

Compare the variables the template uses against the keys you actually send, nested ones included. A key that is present but null is not the same as a key that is filled in.

Iterate with a tix_test_ key against a sandbox recipient such as [email protected]. Test sends never leave the platform and never consume quota, so you can correct the payload at no cost. See test mode.

Is it safe to retry​

No, not unchanged. The same template and the same template_data fail the same way. Correct one of them and send a new request.

Reusing the Idempotency-Key is safe, because a rejected request was never stored.