v1

latestOpenAPI 3.1.02026-07-2670105729.6 KB
Emails

Send an email

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.

post/v1/sends

Headers

Idempotency-Keystring

Optional idempotency key for safe retries. Reusing the same key with the same request body returns the original response for 24 hours.

Request body

OR

Response

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

status'sent' required
recipientstring email required