Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Telnyx API key supplied as Authorization: Bearer <token>. In production, auth may be validated by the API gateway and forwarded via Telnyx auth headers.

Headers

Idempotency-Key
string

Optional opaque, unquoted key for safely retrying the same logical request. Keys must contain 1 to 255 letters, numbers, hyphens, or underscores. Generate a unique UUID v4 for each operation and reuse it only when retrying that operation with the same request. Invalid headersโ€”including duplicate, empty, malformed, or overlong valuesโ€”return 400 with error code 10015. A request already in progress with the same key returns 409; reusing the key with a different request returns 422. Only successful responses are replayed, for up to 24 hours. Do not include sensitive data in the key.

Required string length: 1 - 255
Pattern: ^[A-Za-z0-9_-]{1,255}$

Body

application/json

Recipient email addresses must be unique across to, cc, and bcc after case-insensitive normalization. Duplicate recipients return 400 Bad Request.

from
required
to
(string | object)[]
required
Minimum array length: 1
from_name
string

Optional display name for string from; overrides from.name when provided.

cc
(string | object)[]
bcc
(string | object)[]
reply_to

Reply-to address. If provided as an object with a name, only the email is stored; the name is ignored.

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.

html_body
string

HTML email body. Returned only by GET /email_messages/{id}; omitted from create and list responses.

text_body
string

Plain text email body. Returned only by GET /email_messages/{id}; omitted from create and list responses.

headers
object

Custom email headers. Write-only; not returned in responses.

attachments
object[]
tags
string[]

Tags for categorization and reporting. Stored on the message and propagated to Email Detail Records. Not returned in API responses.

group_id
string<uuid> | null

Optional unsubscribe-group UUID used for group-scoped suppression checks and unsubscribe handling.

ignore_suppression
boolean
default:false

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.

metadata
object

Custom metadata. Write-only; not returned in responses.

tracking_settings
object

Per-send open and click tracking overrides. Omitted properties inherit the sender domain's tracking settings.

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.

scheduled_at
string<date-time> | null

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

Deprecated alias for scheduled_at.

inline_css
boolean
default:false
sandbox_mode
boolean
default:false
in_reply_to_message_id
string<uuid> | null

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).

reply_to_all
boolean | null
default:false

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.

forward_of_message_id
string<uuid> | null

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).

Response

Message queued, scheduled, or sandbox-created.

data
object
required
suppressed
object[]

Recipients removed by suppression checks when at least one recipient remains and the message is accepted.