> ## Documentation Index
> Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Send a draft

> Sends the draft through the standard send pipeline — the same domain resolution,
suppression, reputation, daily-quota, persistence and Detail Record behaviour as
`POST /v2/email_messages`. The response body is the created email message.

If the draft has no explicit `from_email`, the inbox address is used.

The draft is marked `sent` only after the send is accepted; a send rejected for
suppression, quota or reputation leaves the draft editable so it can be fixed and
retried. A draft that is already `sent` returns 422 rather than sending twice.




## OpenAPI

````yaml /openapi/generated/email/inboxes.yml post /email_inboxes/{inbox_id}/drafts/{draft_id}/send
openapi: 3.1.0
info:
  contact:
    email: support@telnyx.com
  description: API for managing email inboxes, drafts, messages, filters, and threads.
  title: Telnyx Email Inboxes API
  version: 2.0.0
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /email_inboxes/{inbox_id}/drafts/{draft_id}/send:
    post:
      tags:
        - Email Drafts
      summary: Send a draft
      description: >
        Sends the draft through the standard send pipeline — the same domain
        resolution,

        suppression, reputation, daily-quota, persistence and Detail Record
        behaviour as

        `POST /v2/email_messages`. The response body is the created email
        message.


        If the draft has no explicit `from_email`, the inbox address is used.


        The draft is marked `sent` only after the send is accepted; a send
        rejected for

        suppression, quota or reputation leaves the draft editable so it can be
        fixed and

        retried. A draft that is already `sent` returns 422 rather than sending
        twice.
      operationId: SendEmailDraft
      parameters:
        - $ref: '#/components/parameters/DraftInboxId'
        - $ref: '#/components/parameters/DraftId'
      responses:
        '202':
          description: >-
            The draft was accepted for delivery. Returns the created email
            message.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EmailMessageResponse'
        '400':
          description: >-
            The draft is missing fields required to send (sender, subject, or
            recipients).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/email_ErrorResponse'
        '401':
          $ref: '#/components/responses/email_UnauthorizedResponse'
        '403':
          description: The sender domain is not permitted to send.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/email_ErrorResponse'
        '404':
          $ref: '#/components/responses/email_NotFoundResponse'
        '422':
          description: The draft has already been sent, or failed send-time validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/email_ErrorResponse'
              example:
                errors:
                  - code: '10015'
                    title: Validation Failed
                    detail: this draft has already been sent
                    source:
                      pointer: /data/attributes/status
        '429':
          description: The account's daily send limit was exceeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/email_ErrorResponse'
        '503':
          $ref: '#/components/responses/DraftUnavailableResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const response = await client.emailInboxes.drafts.send('inbox_id',
            'draft_id');


            console.log(response.data);
        - lang: Python
          source: |-
            import os
            from telnyx import Telnyx

            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )
            response = client.email_inboxes.drafts.send(
                "inbox_id",
                "draft_id",
            )
            print(response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tresponse, err := client.EmailInboxes.Drafts.Send(\n\t\tcontext.TODO(),\n\t\t\"inbox_id\",\n\t\t\"draft_id\",\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.Data)\n}\n"
        - lang: Java
          source: |-
            package com.telnyx.sdk.example;

            import com.telnyx.sdk.client.TelnyxClient;
            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    var response = client.emailInboxes().drafts().send("inbox_id", "draft_id");
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

            telnyx = Telnyx::Client.new(api_key: "My API Key")

            response = telnyx.email_inboxes.drafts.send("inbox_id", "draft_id")

            puts(response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $response = $client->emailInboxes->drafts->send(
                'inbox_id',
                'draft_id',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx email-inboxes:drafts send \
              --api-key 'My API Key' \
              --inbox-id inbox_id \
              --draft-id draft_id
components:
  parameters:
    DraftInboxId:
      name: inbox_id
      in: path
      required: true
      description: Email inbox UUID.
      schema:
        type: string
        format: uuid
    DraftId:
      name: draft_id
      in: path
      required: true
      description: Email draft UUID.
      schema:
        type: string
        format: uuid
  schemas:
    EmailMessageResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/EmailMessage'
        suppressed:
          type: array
          description: >-
            Recipients removed by suppression checks when at least one recipient
            remains and the message is accepted.
          items:
            $ref: '#/components/schemas/SuppressedRecipient'
      required:
        - data
    email_ErrorResponse:
      type: object
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorObject'
        suppressed:
          type: array
          description: >-
            Present when every recipient is suppressed, so the request is
            rejected and no message is created.
          items:
            $ref: '#/components/schemas/SuppressedRecipient'
      required:
        - errors
    EmailMessage:
      type: object
      properties:
        record_type:
          type: string
          enum:
            - email_message
        id:
          type: string
          format: uuid
        status:
          $ref: '#/components/schemas/EmailMessageStatus'
        from:
          $ref: '#/components/schemas/EmailAddress'
        to:
          type: array
          items:
            $ref: '#/components/schemas/EmailAddress'
        cc:
          type: array
          items:
            $ref: '#/components/schemas/EmailAddress'
        bcc:
          type: array
          items:
            $ref: '#/components/schemas/EmailAddress'
        reply_to:
          type:
            - string
            - 'null'
        subject:
          type: string
        template_id:
          type:
            - string
            - 'null'
          format: uuid
        template_variables:
          type: object
          additionalProperties: true
          default: {}
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/AttachmentResponse'
        events:
          type: array
          items:
            $ref: '#/components/schemas/MessageEvent'
        created_at:
          type: string
          format: date-time
        scheduled_at:
          type: string
          format: date-time
          description: >-
            Present when a scheduled_at value was stored. Persists even after
            the scheduled send has been processed or cancelled.
        inline_css:
          type: boolean
          description: >-
            Present when true in the immediate create response. Not persisted;
            absent on subsequent GET requests.
        sandbox:
          type: boolean
          description: Present when sandbox mode was used.
        recipient_statuses:
          type: object
          description: >
            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}`.
          additionalProperties:
            type: integer
          example:
            delivered: 998
            bounced: 2
      required:
        - record_type
        - id
        - status
        - from
        - to
        - cc
        - bcc
        - subject
        - reply_to
        - template_id
        - template_variables
        - attachments
        - events
        - created_at
    SuppressedRecipient:
      type: object
      properties:
        to:
          type: string
          format: email
          description: Suppressed recipient email address.
        reason:
          type: string
          description: Suppression reason returned by the recipient suppression service.
        scope:
          type: string
          description: Scope at which the suppression applies.
        override_allowed:
          type: boolean
          description: Whether an authorized send may override this suppression.
      required:
        - to
        - reason
        - scope
        - override_allowed
    ErrorObject:
      type: object
      properties:
        code:
          type: string
          description: >-
            Telnyx error code. Edge idempotency errors use 10027 or 10036.
            Fallback 404/500 responses from the framework may use string status
            codes ('404', '500') instead.
          enum:
            - '10001'
            - '10006'
            - '10007'
            - '10015'
            - '10016'
            - '10019'
            - recipient_suppressed
            - reputation_suspended
            - '404'
            - '500'
            - '10027'
            - '10036'
        title:
          type: string
        detail:
          description: >-
            Human-readable error detail. Changeset responses may return a
            structured object.
          oneOf:
            - type: string
            - type: object
              additionalProperties: true
        source:
          type:
            - object
            - 'null'
          additionalProperties: true
        meta:
          type:
            - object
            - 'null'
          additionalProperties: true
          description: Additional metadata. Present on 401 errors with a documentation URL.
      required:
        - code
        - title
        - detail
    EmailMessageStatus:
      type: string
      description: >-
        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.
      enum:
        - queued
        - scheduled
        - cancelled
        - sandbox
        - sending
        - sent
        - failed
        - deferred
        - delivered
        - bounced
        - complained
        - rejected
        - opened
        - clicked
        - unsubscribed
    EmailAddress:
      type: object
      properties:
        email:
          type: string
        name:
          type: string
      required:
        - email
    AttachmentResponse:
      type: object
      description: EDR-aligned attachment metadata. The base64 `content` is never returned.
      properties:
        url:
          type:
            - string
            - 'null'
          format: uri
          description: Telnyx-hosted public URL for the attachment content.
        sha256:
          type:
            - string
            - 'null'
          description: SHA-256 hex digest of the attachment content.
        size_bytes:
          type:
            - integer
            - 'null'
          description: Attachment size in bytes.
        filename:
          type: string
        content_type:
          type: string
        disposition:
          type: string
          default: attachment
          description: >-
            MIME disposition (e.g. `attachment` or `inline`). Runtime passes
            through the stored value without enforcing an enum.
        content_id:
          type:
            - string
            - 'null'
          description: MIME Content-ID for inline references.
      required:
        - url
        - sha256
        - size_bytes
        - filename
        - content_type
        - disposition
        - content_id
    MessageEvent:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/EmailEventType'
        occurred_at:
          type: string
          format: date-time
        payload:
          type: object
          additionalProperties: true
      required:
        - type
        - occurred_at
    EmailEventType:
      type: string
      enum:
        - queued
        - deferred
        - scheduled
        - cancelled
        - sandbox
        - sending
        - sent
        - failed
        - delivered
        - bounced
        - complained
        - rejected
        - opened
        - clicked
        - unsubscribed
        - daily_limit_exceeded
  responses:
    email_UnauthorizedResponse:
      description: Not authorized (10006).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/email_ErrorResponse'
          example:
            errors:
              - code: '10006'
                title: Not authorized
                detail: Invalid API key
                meta:
                  url: https://developers.telnyx.com/docs/overview/errors/10006
    email_NotFoundResponse:
      description: Resource not found (10001).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/email_ErrorResponse'
          example:
            errors:
              - code: '10001'
                title: Not Found
                detail: The requested resource was not found
    DraftUnavailableResponse:
      description: Drafts or the email domain service are temporarily unavailable (10016).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/email_ErrorResponse'
          example:
            errors:
              - code: '10016'
                title: Service Unavailable
                detail: Drafts are temporarily unavailable. Please try again later.
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````