---
title: "Send an email"
method: POST
path: "/v1/sends"
tags: ["Emails"]
---

# Send an email

`POST /v1/sends`

Sends an email design. Polymorphic on the `test` flag:

- **`test: true`** → a synchronous one-off TEST delivery of the design’s current (or pinned) body to a single address. Forces the Brew default sender (no verified domain needed), targets one `to` address, and never creates a `Send` row. Returns **`200`** `{ status: "sent", recipient }`.
- **default / `test: false`** → a campaign send combining the design (`emailId`, optionally pinned to `emailVersionId`), a verified `domainId`, and a target — a saved `audienceId` OR inline `to` (a single email or an array, max 50) — into one delivery event. The same design can be sent unlimited times; every call mints a new send. Returns **`202`** `{ sendId, runId }` — poll via `GET /v1/analytics/sends?sendId=`.

Campaign target — provide EXACTLY ONE of `audienceId` or `to`. Inline recipients face the same unsubscribe/suppression gate and per-recipient quota as audience sends. For per-recipient event-driven delivery, publish an automation and fire its trigger (`POST /v1/automations/triggers/{triggerEventId}/fire`).

Brand scoping: resources (`emailId`, `domainId`, `audienceId`) living in a different brand surface as `404` so the API never confirms cross-brand existence.

## Headers

- `Idempotency-Key` string

## Request body

- union
  - object
    - `test` true, required
    - `emailId` string, required
    - `emailVersionId` string
    - `subject` string, required
    - `previewText` string — Inbox preheader for this test send — overrides the design's JSX <Preview>. Omit to deliver the design's own preview line.
    - `to` string, email, required
    - `replyTo` string, email
  - object
    - `test` false
    - `emailId` string, required
    - `emailVersionId` string
    - `subject` string, required
    - `previewText` string — Inbox preheader for THIS send — overrides the design's JSX <Preview>. Omit to deliver the design's own preview line (returned as `previewText` on `GET /v1/emails?emailId=`).
    - `replyTo` string — Reply-to address. Accepts a bare email (`a@b.com`) or the display-name form (`Name <a@b.com>`).
    - `senderName` string
    - `fromEmail` string
    - `messageClass` 'marketing' | 'transactional'
    - `consent` object
      - `source` 'api' | 'form' | 'import', required
      - `capturedAt` string, date-time, required
      - `policyVersion` string, required
    - `domainId` string, required
    - `audienceId` string
    - `to` union
      - string, email
      - string[]
    - `scheduledAt` string, date-time
    - `gradualSend` object
      - `startingPercentage` number, required
      - `incrementPercentage` number, required
      - `interval` union, required
        - object
          - `value` integer, required
          - `unit` 'hour', required
        - object
          - `value` integer, required
          - `unit` 'day', required
      - `timeZone` string, required — IANA timezone used to preserve local wall-clock time for day intervals.

## Response `200`

The TEST send (`test: true`) was delivered synchronously to the single recipient.

- SendEmailTestResponse
  - `status` 'sent', required
  - `recipient` string, email, required

## Other responses

- `202` — The campaign send was accepted, queued or scheduled.
- `400` — Invalid body — missing required field (`emailId`, `domainId`, `subject`), neither or both of `audienceId`/`to`, more than 50 inline `to` addresses, a past `scheduledAt`, or an unknown key.
- `401` — The API key was missing, invalid, or revoked.
- `403` — The caller does not have the required `sends` permission.
- `404` — The referenced email, domain, or audience was not found in the API-key brand.
- `409` — The same `Idempotency-Key` was reused with a different request body.
- `422` — The referenced resource exists but is not ready.
- `429` — The request hit the rolling rate limit window.
- `500` — Unexpected internal error.

---

[API](https://skmtc.net/brew/apis/brew-public-api-v1.md) · [All operations](https://skmtc.net/brew/apis/brew-public-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brew/brew-public-api-v1/versions/db96cfedc6c5/schema)
