---
title: "Create or send an email message"
method: POST
path: "/email_messages"
tags: ["Email Messages"]
---

# Create or send an email message

`POST /email_messages`

Queues, schedules, or sandbox-sends an email message. The legacy `/v2/emails` POST route
is a backward-compatible alias for this operation.

`subject` is required unless `template_id` is supplied. When using `template_id`, do not
also provide `subject`, `html_body`, or `text_body`; the template is rendered with
`template_variables`.

Note: template lookup failures (not found, wrong account) return 400, not 404.

## Headers

- `Idempotency-Key` string

## Request body

- CreateEmailRequest — Recipient email addresses must be unique across `to`, `cc`, and `bcc` after case-insensitive normalization. Duplicate recipients return `400 Bad Request`.
  - `attachments` AttachmentRequest[]
    - `content` string — Attachment content, typically Base64-encoded. Defaults to empty string when omitted.
    - `content_id` string, nullable — MIME Content-ID used to reference an inline attachment.
    - `content_type` string — MIME content type. Defaults to "application/octet-stream" when omitted.
    - `disposition` string — MIME disposition (`attachment` or `inline`).
    - `filename` string — Attachment filename. Defaults to "attachment" when omitted.
  - `bcc` EmailAddressInput[]
    - union
      - string
      - EmailAddress
        - `email` string, required
        - `name` string
  - `cc` EmailAddressInput[]
    - union
      - string
      - EmailAddress
        - `email` string, required
        - `name` string
  - `forward_of_message_id` string, uuid, nullable — Telnyx message UUID of the message this send forwards. Forwarded messages start a NEW thread per RFC 5322 — NO `In-Reply-To` or `References` headers are set on the outbound MIME. The id is recorded in the message's metadata for EDR provenance only. The id is validated as a UUID but is NOT looked up against the message store — existence is the caller's responsibility (the forward is pure metadata; it does not affect delivery). Cannot be combined with `in_reply_to_message_id` (422).
  - `from` union, required
    - string
    - EmailAddress
      - `email` string, required
      - `name` string
  - `from_name` string — Optional display name for string `from`; overrides `from.name` when provided.
  - `group_id` string, uuid, nullable — Optional unsubscribe-group UUID used for group-scoped suppression checks and unsubscribe handling.
  - `headers` object — Custom email headers. Write-only; not returned in responses.
  - `html_body` string — HTML email body. Returned only by `GET /email_messages/{id}`; omitted from create and list responses.
  - `ignore_suppression` boolean — When true, allows delivery to recipients whose suppressions explicitly permit an override. Hard bounces, spam complaints, and invalid-address suppressions cannot be overridden. Requires the `email:override` API scope.
  - `in_reply_to_message_id` string, uuid, nullable — Telnyx message UUID of the message this send replies to. When provided, the API sets RFC 5322 `In-Reply-To` and `References` headers on the outbound MIME so the recipient's mailbox (Gmail/Outlook) threads it correctly. The parent is looked up under the caller's account scope; a UUID belonging to another account yields a non-enumerating 404. Wire-only (Phase 1): the API sets the headers and does NOT resolve or mutate `thread_id` on the server side. Messages sent without this parameter are standalone (no threading headers injected). Cannot be combined with `forward_of_message_id` (422).
  - `inline_css` boolean
  - `metadata` object — Custom metadata. Write-only; not returned in responses.
  - `reply_to` union
    - string
    - EmailAddress
      - `email` string, required
      - `name` string
  - `reply_to_all` boolean, nullable — Indicates a reply-all intent. In Phase 1 (wire-only) this does not change the threading headers — recipient selection is customer- controlled (`to`/`cc`), and a thread is not defined by its audience. When the referenced message has no thread context, reply-all degrades to a plain reply (parent ID only in `References`). The resolution engine (separate work) will expand the ancestor chain at a later phase with no API change. Only meaningful alongside `in_reply_to_message_id`.
  - `sandbox_mode` boolean
  - `scheduled_at` string, date-time, nullable — Future ISO 8601 time to schedule sending. Invalid or past timestamps are silently ignored and the email is sent immediately. The legacy alias `send_at` is still accepted for backward compatibility; when both are provided, `scheduled_at` wins.
  - `send_at` string, date-time — Deprecated alias for `scheduled_at`.
  - `subject` string — Required unless `template_id` is supplied. When using a template, the template's subject is rendered; if the template has no subject or renders empty, the request returns 400.
  - `tags` string[] — Tags for categorization and reporting. Stored on the message and propagated to Email Detail Records. Not returned in API responses.
  - `template_id` string, uuid
  - `template_variables` object — Variables for Liquid template rendering. Non-object values may cause a 422 validation error on message creation, but are silently treated as an empty object for template rendering.
  - `text_body` string — Plain text email body. Returned only by `GET /email_messages/{id}`; omitted from create and list responses.
  - `to` EmailAddressInput[], required
    - union
      - string
      - EmailAddress
        - `email` string, required
        - `name` string
  - `tracking_settings` TrackingSettings — Per-send open and click tracking overrides. Omitted properties inherit the sender domain's tracking settings.
    - `click_tracking` boolean — Whether to rewrite links for click tracking in this message.
    - `open_tracking` boolean — Whether to inject an open-tracking pixel for this message.

## Response `202`

Message queued, scheduled, or sandbox-created.

- EmailMessageResponse
  - `data` EmailMessage, required
    - `attachments` AttachmentResponse[], required
      - `content_id` string, nullable, required — MIME Content-ID for inline references.
      - `content_type` string, required
      - `disposition` string, required — MIME disposition (e.g. `attachment` or `inline`). Runtime passes through the stored value without enforcing an enum.
      - `filename` string, required
      - `sha256` string, nullable, required — SHA-256 hex digest of the attachment content.
      - `size_bytes` integer, nullable, required — Attachment size in bytes.
      - `url` string, uri, nullable, required — Telnyx-hosted public URL for the attachment content.
    - `bcc` EmailAddress[], required
      - `email` string, required
      - `name` string
    - `cc` EmailAddress[], required
      - `email` string, required
      - `name` string
    - `created_at` string, date-time, required
    - `events` MessageEvent[], required
      - `occurred_at` string, date-time, required
      - `payload` object
      - `type` 'queued' | 'deferred' | 'scheduled' | 'cancelled' | 'sandbox' | 'sending' | 'sent' | 'failed' | 'delivered' | 'bounced' | 'complained' | 'rejected' | 'opened' | 'clicked' | 'unsubscribed' | 'daily_limit_exceeded', required
    - `from` EmailAddress, required
      - `email` string, required
      - `name` string
    - `id` string, uuid, required
    - `inline_css` boolean — Present when true in the immediate create response. Not persisted; absent on subsequent GET requests.
    - `recipient_statuses` object — Per-status recipient counts for the message. Present only for outbound messages with recipient rows. Keys are recipient statuses, values are counts. Example: `{"delivered": 998, "bounced": 2}`.
    - `record_type` 'email_message', required
    - `reply_to` string, nullable, required
    - `sandbox` boolean — Present when sandbox mode was used.
    - `scheduled_at` string, date-time — Present when a scheduled_at value was stored. Persists even after the scheduled send has been processed or cancelled.
    - `status` 'queued' | 'scheduled' | 'cancelled' | 'sandbox' | 'sending' | 'sent' | 'failed' | 'deferred' | 'delivered' | 'bounced' | 'complained' | 'rejected' | 'opened' | 'clicked' | 'unsubscribed', required — Current status of an email message. Lifecycle statuses (queued, scheduled, etc.) are set on creation. Delivery statuses (delivered, bounced, etc.) are updated by delivery event consumers.
    - `subject` string, required
    - `template_id` string, uuid, nullable, required
    - `template_variables` object, required
    - `to` EmailAddress[], required
      - `email` string, required
      - `name` string
  - `suppressed` SuppressedRecipient[] — Recipients removed by suppression checks when at least one recipient remains and the message is accepted.
    - `override_allowed` boolean, required — Whether an authorized send may override this suppression.
    - `reason` string, required — Suppression reason returned by the recipient suppression service.
    - `scope` string, required — Scope at which the suppression applies.
    - `to` string, email, required — Suppressed recipient email address.

## Other responses

- `400` — Bad Request / Validation Failed (10015). Invalid, duplicate, empty, malformed, or overlong Idempotency-Key headers are rejected by Edge with HTTP 400 and error code 10015.
- `401` — Not authorized (10006).
- `403` — Forbidden (10007), such as domain not verified, suspended, degraded, or missing DKIM.
- `404` — Resource not found (10001).
- `409` — A request with the same Idempotency-Key is still being processed (10036). Retry later with the same key and request.
- `413` — Request body exceeds the 8,000,000-byte limit for this endpoint.
- `422` — Validation failed, send-time template rendering failed, or all recipients suppressed (code `recipient_suppressed`, includes top-level `suppressed` array). Reusing an Idempotency-Key with a different request also returns 422 (10027).
- `429` — Sending suspended — domain reputation band is 'poor'.
- `503` — Service unavailable (10016), including an unavailable upstream dependency or unavailable Edge idempotency protection for a keyed request.

---

[API](https://skmtc.net/team-telnyx/apis/telnyx-api-2.md) · [All operations](https://skmtc.net/team-telnyx/apis/telnyx-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/team-telnyx/telnyx-api-2/revisions/3fdc16374d70/schema)
