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

# Send draft

> Send an email draft. Handles secure send with attachments, recipient limits, private email settings, and synchronous provider delivery. When the team's email_outbox feature is enabled for an immediate Nylas send, the 200 response contains queued=true, outbox_key, and estimate instead of synchronous message fields.



## OpenAPI

````yaml /api-reference/cx/swagger.json post /inbox/draft/{message}
openapi: 3.0.0
info:
  description: CX API.
  title: CX API
  contact:
    name: API Support
    url: https://stax.ai
    email: support@stax.ai
  version: '1.0'
servers:
  - url: https://api.cx.stax.ai
security: []
paths:
  /inbox/draft/{message}:
    post:
      tags:
        - Inbox
      summary: Send draft
      description: >-
        Send an email draft. Handles secure send with attachments, recipient
        limits, private email settings, and synchronous provider delivery. When
        the team's email_outbox feature is enabled for an immediate Nylas send,
        the 200 response contains queued=true, outbox_key, and estimate instead
        of synchronous message fields.
      parameters:
        - description: Message ID
          name: message
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Either a synchronously sent message or queued delivery metadata
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg_routes_inbox_draft.SendDraftResponse'
        '400':
          description: >-
            Invalid message ID, email connection not live, too many recipients
            (max 500), secure send validation failed, or team branding not set
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '409':
          description: Draft has already been sent (concurrent or repeated send)
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '500':
          description: Internal server error or email provider disconnected
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      security:
        - ApiKeyAuth: []
components:
  schemas:
    pkg_routes_inbox_draft.SendDraftResponse:
      type: object
      properties:
        _id:
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/types.Attachment'
        bcc:
          type: string
        bookmark:
          type: boolean
        brief:
          description: Single-line summary
          type: string
        cc:
          type: string
        checksum:
          description: Checksum for de-duplication
          type: string
        clients:
          description: Is this message to/from a client?
          type: array
          items:
            type: string
        created:
          type: boolean
        created_at:
          type: string
        date:
          type: string
        deleted_at:
          type: string
        domains:
          type: array
          items:
            type: string
        draft:
          type: boolean
        estimate:
          type: integer
        from:
          type: string
        html:
          type: string
        importance:
          type: integer
        in_reply_to:
          type: string
        internal:
          description: Is this message to/from only internal users?
          type: boolean
        message_folders:
          description: >-
            MessageFolders references the `folders` catalog rows this message
            belongs to

            (by their local ObjectID) — the per-mailbox equivalent of Tags
            (which is a

            team-wide label system). Each catalog row carries the provider's
            external_id;

            storing the local _id keeps renames free and gives referential
            integrity.

            Gmail = multi-label, Outlook = single-folder; the array models both.
          type: array
          items:
            type: string
        outbox:
          description: Magical stuff
          type: boolean
        outbox_key:
          type: string
        private:
          description: >-
            The private flag is used if the message is from/to only internal
            admins (regardless of how many external users) that have the
            memberships.email.private flag set.

            This prevents other users from seeing external messages that may be
            private.
          type: boolean
        queued:
          type: boolean
        read:
          type: string
        references:
          type: string
        reply:
          type: string
        requires_response:
          type: boolean
        responses:
          type: array
          items:
            type: string
        safe_for_everyone:
          type: boolean
        schedule_id:
          description: >-
            ScheduleID is the Nylas message-schedule id returned by a native
            send_at

            (scheduled) send, used to reconcile the eventual Sent-folder message
            back

            onto this row (Nylas migration, Stage 4). Mirror of
            legacytypes.Message.
          type: string
        schedule_send_at:
          description: Schedule sending this at a specific time
          type: string
        secure:
          type: boolean
        send_failed:
          description: >-
            SendFailed marks a message whose provider-side send failed (Nylas

            message.send_failed webhook — typically a scheduled send) so the UI
            can

            flag it for the user to retry. Mirror of legacytypes.Message.
          type: boolean
        send_scheduled:
          type: boolean
        send_state:
          description: >-
            SendState records the provider-reported delivery state. Mirror of
            legacytypes.Message.
          type: string
        sentiment:
          type: integer
        source:
          type: string
        source_history_id:
          type: string
        source_id:
          type: string
        status:
          type: string
        subject:
          type: string
        summary:
          type: array
          items:
            type: string
        tags:
          type: array
          items:
            type: string
        tasks:
          type: array
          items:
            type: string
        team:
          type: string
        text:
          type: string
        thread:
          type: string
        to:
          type: string
        unique_key:
          type: string
        user:
          type: string
    types.Attachment:
      type: object
      properties:
        content_id:
          type: string
        file:
          type: string
        filename:
          type: string
        isInline:
          type: boolean
        size:
          type: integer
        source_id:
          type: string
        url:
          type: string
  securitySchemes:
    ApiKeyAuth:
      description: CX API key. Create one in CX under Settings → Advanced → API Keys.
      in: header
      name: x-api-key
      type: apiKey

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.