Email Messages

Create a batch of email messages

Creates up to 1,000 email messages in a single request. Request-wide admission checks run first and can reject the whole batch before message creation. After those checks pass, each message is validated and sent independently; item-level failures do not affect other messages, and the processed batch returns 207 Multi-Status. Per-message failures include validation errors; when a template has strict_variables enabled, a missing required variable produces a per-item unprocessable_entity error naming that variable while the other messages continue.

post/email_messages/batch

Headers

Idempotency-Keystring

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.

Request body

sandbox_modeboolean

Applies sandbox mode to all messages in the batch and overrides any per-message sandbox_mode value — each message's effective sandbox_mode is exactly this envelope value. Reserved recipients at test.telnyx.com produce the deterministic event chains documented on CreateEmailRequest.sandbox_mode; no batch item is injected into the MTA or outbound Kafka path. Sandbox batch items are non-billable, consume no daily-send-limit quota, and feed no delivery-reputation signals.

Response

Multi-Status — returned after request-wide admission checks pass and item processing runs. Each message is validated and sent independently; per-message failures do not affect other messages in the batch. An invalid or non-future scheduled_at/send_at is reported as a per-item unprocessable_entity error while the remaining items continue. When all messages succeed, errors is empty and every item is in data; otherwise data contains successes and errors contains failures. Request-wide gates can instead return 4xx or 5xx.

Example response

{
  "data": [
    {
      "recipient_statuses": {
        "delivered": 998,
        "bounced": 2
      }
    }
  ]
}

Changes

Changed in 10 of the 99 revisions of this API.94937

  • 16bfa298dc71102See the full diff
    • ●

      added the new expired enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new gw_reject enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new injection_timeout enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new quarantine_expired enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new quarantine_rejected enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new quarantine_release_dispatched enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new quarantine_released enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new quarantined enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new scan_deferred enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new suppressed enum value to the //// response property for the response status

      response-property-enum-value-added

    • ○

      added the required property // to the response with the status

      response-required-property-added

    • ○

      added the required property // to the response with the status

      response-required-property-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 9621f6123ebc213See the full diff
    • ▲

      added to the response body oneOf list for the response status

      response-body-one-of-added

    • ▲

      the response's body type changed from object to no type for status

      response-body-type-changed

    • ●

      removed the optional property from the response with the status

      response-optional-property-removed

    • ●

      added the new 10011 enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new 10011 enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new 10011 enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new 10011 enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new 10011 enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new 10011 enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new domain_graduation_limit_exceeded enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new domain_graduation_limit_exceeded enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new domain_graduation_limit_exceeded enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new domain_graduation_limit_exceeded enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new domain_graduation_limit_exceeded enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new domain_graduation_limit_exceeded enum value to the // response property for the response status

      response-property-enum-value-added

  • a6a61a29ecdd11See the full diff
    • ●

      added the new unprocessable_entity enum value to the // response property for the response status

      response-property-enum-value-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    This revision also has 34 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

  • 14417f20871711See the full diff
    • ▲

      removed the success response with the status

      response-success-status-removed

    • ●

      the optional response header Idempotent-Replayed removed for the status 207

      optional-response-header-removed

  • b1bf96d8391e2622See the full diff
    • ▲

      removed the required property // from the response with the status

      response-required-property-removed

    • ▲

      removed the required property // from the response with the status

      response-required-property-removed

    • ●

      removed the optional property // from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property // from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property // from the response with the status

      response-optional-property-removed

    • ●

      removed the optional property // from the response with the status

      response-optional-property-removed

    • ●

      added the new daily_limit_exceeded enum value to the //// response property for the response status

      response-property-enum-value-added

    • ●

      added the new daily_limit_exceeded enum value to the //// response property for the response status

      response-property-enum-value-added

    • ○

      added the new optional request property ////

      new-optional-request-property

    • ○

      added the new optional request property ////

      new-optional-request-property

    • ○

      added the new optional request property //

      new-optional-request-property

    • ○

      added the new optional request property //

      new-optional-request-property

    • ○

      the request property // became nullable

      request-property-became-nullable

    • ○

      request property // deprecated

      request-property-deprecated

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    • ○

      added the optional property // to the response with the status

      response-optional-property-added

    • ○

      added the required property //// to the response with the status

      response-required-property-added

    • ○

      added the required property //// to the response with the status

      response-required-property-added

    • ○

      added the required property //// to the response with the status

      response-required-property-added

    • ○

      added the required property //// to the response with the status

      response-required-property-added

    • ○

      added the required property //// to the response with the status

      response-required-property-added

    • ○

      added the required property //// to the response with the status

      response-required-property-added

    • ○

      added the required property //// to the response with the status

      response-required-property-added

    • ○

      added the required property //// to the response with the status

      response-required-property-added

    • ○

      added the required property //// to the response with the status

      response-required-property-added

    • ○

      added the required property //// to the response with the status

      response-required-property-added

    • ○

      added the required property // to the response with the status

      response-required-property-added

    • ○

      added the required property // to the response with the status

      response-required-property-added

  • 2fb3b617430a126See the full diff
    • ●

      added the new recipient_suppressed enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new recipient_suppressed enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new recipient_suppressed enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new recipient_suppressed enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new recipient_suppressed enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new recipient_suppressed enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new reputation_suspended enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new reputation_suspended enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new reputation_suspended enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new reputation_suspended enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new reputation_suspended enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new reputation_suspended enum value to the // response property for the response status

      response-property-enum-value-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

    • ○

      added the optional property to the response with the status

      response-optional-property-added

  • 021f0faf96df11See the full diff
    • ▲

      for the header request parameter Idempotency-Key, the maxLength was decreased from 512 to 255

      request-parameter-max-length-decreased

    • ●

      changed the pattern of the header request parameter Idempotency-Key from ^(?:[A-Za-z0-9_-]{1,255}|"(?:[\x20-\x21\x23-\x5B\x5D-\x7E]|\\["\\]){1,255}")$ to ^[A-Za-z0-9_-]{1,255}$

      request-parameter-pattern-changed

  • b3c5aebde44c255See the full diff
    • ▲

      removed the required property // from the response with the status

      response-required-property-removed

    • ▲

      removed the required property // from the response with the status

      response-required-property-removed

    • ●

      removed the request property //

      request-property-removed

    • ●

      added the new 10027 enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new 10027 enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new 10036 enum value to the // response property for the response status

      response-property-enum-value-added

    • ●

      added the new 10036 enum value to the // response property for the response status

      response-property-enum-value-added

    • ○

      added the new optional header request parameter Idempotency-Key

      new-optional-request-parameter

    • ○

      added the non-success response with the status

      response-non-success-status-added

    • ○

      added the non-success response with the status

      response-non-success-status-added

    • ○

      added the non-success response with the status

      response-non-success-status-added

    • ○

      added the non-success response with the status

      response-non-success-status-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ○

      endpoint added

      endpoint-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • ▲

      api path removed without deprecation

      api-path-removed-without-deprecation

    This revision also has 111 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

Of the 99 revisions, 1 has no diff computed.