---
title: "Send a template test"
method: POST
path: "/templates/{templateKey}/test-send"
tags: ["templates"]
---

# Send a template test

`POST /templates/{templateKey}/test-send`

## Request

- Base URL: `https://api.mailly.site` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mailly.site/templates/{templateKey}/test-send`
- Auth: HTTP bearer

Sends through the governed send path with testSend=true, recorded as the template_test source.

## Path parameters

- `templateKey` string, required: template stable key

## Request body

- object
  - `version` number: Published version number
  - `draft` boolean: Render the draft (mutually exclusive with version)
  - `locale` string
  - `variables` object
  - `to` string: Test recipient

## Response `200`

Send result (passed through from the Queue service, JSON)

## Other responses

- `400`: Invalid parameters
- `401`: Missing or invalid API key
- `404`: Template or version not found

---

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