---
title: "Get Template HTML"
method: GET
path: "/templates/html"
tags: ["Templates"]
---

# Get Template HTML

`GET /templates/html`

## Request

- Base URL: `https://app.lettr.com/api`
- URL: `https://app.lettr.com/api/templates/html`
- Auth: HTTP bearer

Retrieve the HTML content and merge tags for a template's active version. Requires `project_id` and template `slug` as query parameters.

## Query parameters

- `project_id` integer, required
- `slug` string, required

## Response `200`

Template HTML retrieved successfully

- GetTemplateHtmlResponse
  - `success` true, required
  - `data` object, required
    - `html` string, required: The template HTML content
    - `merge_tags` object[], required
      - `key` string, required
      - `name` string, required
      - `required` boolean, required
    - `subject` string, nullable: The template subject line, if set

## Other responses

- `401`: Unauthorized
- `404`: Template not found or project does not belong to team
- `503`: Service unavailable - the API key could not be verified, so the request was not processed. This does not mean the key is invalid; retry after the delay given in the Retry-After header.

---

[API](https://skmtc.dev/lettr/apis/lettr-api.md) · [All operations](https://skmtc.dev/lettr/apis/lettr-api/llms.txt) · [OpenAPI document](https://skmtc.dev/lettr/apis/lettr-api/revisions/48ef0dac1ebd?raw)
