---
title: "Send a test email"
method: POST
path: "/v1/campaigns/{id}/test-email"
tags: ["Campaigns"]
---

# Send a test email

`POST /v1/campaigns/{id}/test-email`

## Request

- Base URL: `https://api.mailbeast.ai`
- URL: `https://api.mailbeast.ai/v1/campaigns/{id}/test-email`
- Auth: HTTP bearer

Send yourself a rendered preview of one step variant before launching. It goes from a real mailbox and counts toward that mailbox's daily limit, but not your monthly quota. Capped at 12 per day per workspace.

Requires one of the following scopes: `campaigns:lifecycle`, `campaigns:all`, `all:all`.

## Path parameters

- `id` string, uuid, required

## Headers

- `Idempotency-Key` string

## Request body

- SendTestEmailApiDto
  - `variantId` string, uuid, required: The step variant to render: `sequence[].variants[].id` from GET /v1/campaigns/{id}.
  - `accountId` string, uuid, required: The mailbox to send from. It must be one of yours and within its daily limit.
  - `recipient` string, required: Where to send the test. A single address. It is refused if the address, or its domain, is on your blacklist.
  - `personalization` 'dummy' | 'lead', required: Where merge variables come from. `lead` uses a real lead, named by `leadId`. `dummy` uses no lead data: lead tags such as {{first_name}} render EMPTY (only sender tags resolve). There is no fallback: `lead` without `leadId` is rejected.
  - `leadId` string, uuid: The lead whose data fills the merge variables. Required when `personalization` is `lead`, and must be omitted otherwise.

## Response `201`

- TestEmailApiResponseDto
  - `sent` boolean, required: The test email was handed to the mail server.
  - `messageId` string, nullable, required: RFC 5322 Message-ID assigned by the sending server. `null` if the server did not return one.

## Other responses

- `400`: The request body or parameters failed validation.
- `401`: Missing or invalid API key.
- `403`: The key lacks a required scope, or the plan does not include API access.
- `404`: The resource does not exist in your workspace.
- `409`: The request conflicts with current state - e.g. a request with the same Idempotency-Key is still being processed, or the operation partially applied.
- `422`: The Idempotency-Key was already used with a different request body. Use a new key for a new operation.
- `429`: Rate limit exceeded - retry after the interval in the Retry-After header.
- `503`: A dependency is temporarily unavailable.

---

[API](https://skmtc.dev/mailbeast/apis/mailbeast-public-api.md) · [All operations](https://skmtc.dev/mailbeast/apis/mailbeast-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailbeast/apis/mailbeast-public-api/revisions/6440ce0738a4?raw)
