{"command":{"effect":"write","timeoutSeconds":30,"inputSchema":{"type":"object","description":"Render a template with the given template ID and context attribute. Returns the AMP, HTML, and plain text versions of the email template.\n\n**Request body parameters** (nested under `attributes`):\n\n* `return_fields`: Request specific fields using [sparse fieldsets](https://developers.klaviyo.com/en/reference/api_overview#sparse-fieldsets).\n\n* `context`: This is the context your email template will be rendered with. You must pass in a `context` object as a JSON object.\n\nEmail templates are rendered with contexts in a similar manner to Django templates. Nested template variables can be referenced via dot notation. Template variables without corresponding `context` values are treated as `FALSE` and output nothing.\n\nEx. `{ \"name\" : \"George Washington\", \"state\" : \"VA\" }`<br><br>*Rate limits*:<br>Burst: `3/s`<br>Steady: `60/m`\n\n**Scopes:**\n`templates:read`\n\n[OpenAPI Spec](https://raw.githubusercontent.com/klaviyo/openapi/main/openapi/stable/apis/render_template.json)","properties":{"query":{"type":"object","properties":{"fields[template]":{"type":"array","items":{"type":"string","enum":["amp","created","editor_type","html","id","name","screenshot_url","text","updated"]},"description":"For more information please visit https://developers.klaviyo.com/en/v2026-10-15/reference/api-overview#sparse-fieldsets"}},"required":[],"additionalProperties":false},"headers":{"type":"object","properties":{"revision":{"type":"string","default":"2026-10-15","enum":["2026-10-15"],"description":"API endpoint revision (format: YYYY-MM-DD[.suffix])"}},"required":["revision"],"additionalProperties":false},"body":{"$ref":"#/definitions/TemplateRenderQuery"}},"required":["headers","body"],"additionalProperties":false,"definitions":{"TemplateRenderQuery":{"type":"object","properties":{"data":{"$ref":"#/definitions/TemplateRenderQueryResourceObject"}},"required":["data"]},"TemplateRenderQueryResourceObject":{"type":"object","properties":{"type":{"$ref":"#/definitions/TemplateEnum"},"id":{"description":"The ID of template","type":"string"},"attributes":{"type":"object","properties":{"context":{"description":"The context for the template render. This must be a JSON object which has values for any tags used in the template. See [this doc](https://help.klaviyo.com/hc/en-us/articles/4408802648731) for more details.","type":"object","examples":[{"first_name":"Jane","last_name":"Smith"}]}},"required":["context"]}},"required":["type","id","attributes"]},"TemplateEnum":{"type":"string","enum":["template"]}}},"name":"Render Template","id":"klaviyo.render_template","example":{"headers":{"revision":"2026-10-15"},"body":{"data":{"type":"template","id":"example","attributes":{"context":{"first_name":"Jane","last_name":"Smith"}}}}},"maxRequests":1,"summary":false}}