---
title: "Render an email template"
method: GET
path: "/email_template/{id}/render/"
tags: ["email_templates"]
---

# Render an email template

`GET /email_template/{id}/render/`

Render an email template for the given lead/contact using the current user context.

Accepts two forms of usage:

- Single lead/contact:
  - `lead_id` and `contact_id` is supplied (both required)
- Preview results from a search query
  - `query` (required) contains a search query
  - `entry` (optional, ranges from 0 to 99) specifies the index of the lead/contact that should be rendered.
  - `mode` (optional), which can have a value of:
     - `lead` (default), the first contact of the lead with the index given by `entry` will be rendered (excluding leads that have no email addresses).
     - `contact`, then `entry` refers to the index of the contact (excluding contacts that have no emails). Will return an empty dict if there are no more entries.

## Path parameters

- `id` string, required

## Query parameters

- `email_account_id` string
- `bulk_object_type` 'lead' | 'contact'
- `contact_id` string
- `contact_preference` 'lead' | 'contact' | 'all'
- `entry` integer
- `lead_id` string
- `limit` integer
- `query` string
- `results_limit` integer
- `s_query` string
- `sender` string, email
- `sort` object[]
  - `direction` 'asc' | 'desc', required
  - `field` string, required
- `mode` 'lead' | 'contact'

## Response `200`

Successful response

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found

---

[API](https://skmtc.net/close/apis/close-api.md) · [All operations](https://skmtc.net/close/apis/close-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/close/close-api/revisions/0dcf3303e9d7/schema)
