> ## Documentation Index
> Fetch the complete documentation index at: https://openmail-docs-cc-replies.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Send email

> Send an email from an inbox. Requires Idempotency-Key header. Use threadId to reply to an existing thread.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/inboxes/{id}/send
openapi: 3.0.3
info:
  title: OpenMail API
  description: >-
    Email infrastructure API for AI agents. Create inboxes, send and receive
    email, and get real-time notifications via webhooks.
  version: 1.0.0
  license:
    name: Proprietary
servers:
  - url: https://api.openmail.sh
security:
  - bearerAuth: []
paths:
  /v1/inboxes/{id}/send:
    post:
      summary: Send email
      description: >-
        Send an email from an inbox. Requires Idempotency-Key header. Use
        threadId to reply to an existing thread.
      operationId: sendEmail
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
          description: Unique key for idempotent sends (e.g. UUID)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - to
                - subject
                - body
              properties:
                to:
                  type: string
                  format: email
                subject:
                  type: string
                  minLength: 1
                  maxLength: 998
                body:
                  type: string
                  minLength: 1
                  maxLength: 100000
                  description: >-
                    Email body. Plain text or HTML — HTML is auto-detected and
                    rendered, with a plain-text fallback generated
                    automatically.
                bodyHtml:
                  type: string
                  maxLength: 500000
                  description: >-
                    Provide only when the plain-text and HTML versions must
                    differ. Omit for normal sends — put HTML in `body` instead.
                threadId:
                  type: string
                  description: Thread ID for replies
                includeQuote:
                  type: boolean
                  description: >-
                    When replying with threadId, append a quoted copy of the
                    previous message to the body. Defaults to true. Set false to
                    send only your reply text.
                replyTo:
                  type: string
                  format: email
                  description: >-
                    Optional. Address that replies should be routed to (set as
                    the `Reply-To` MIME header). Free plan: must be the address
                    of an inbox you own in OpenMail. Developer plan or higher:
                    any valid email address.
          multipart/form-data:
            schema:
              type: object
              required:
                - to
                - subject
                - body
              properties:
                to:
                  type: string
                  format: email
                subject:
                  type: string
                  minLength: 1
                  maxLength: 998
                body:
                  type: string
                  minLength: 1
                  maxLength: 100000
                  description: >-
                    Email body. Plain text or HTML — HTML is auto-detected and
                    rendered, with a plain-text fallback generated
                    automatically.
                bodyHtml:
                  type: string
                  maxLength: 500000
                  description: >-
                    Advanced. Rarely needed. Provide only when the plain-text
                    and HTML versions must differ. Omit for normal sends — put
                    HTML in `body` instead.
                threadId:
                  type: string
                  description: Thread ID for replies
                includeQuote:
                  type: boolean
                  description: >-
                    When replying with threadId, append a quoted copy of the
                    previous message to the body. Defaults to true. Set false to
                    send only your reply text.
                replyTo:
                  type: string
                  format: email
                  description: >-
                    Optional. Address that replies should be routed to (set as
                    the `Reply-To` MIME header). Free plan: must be the address
                    of an inbox you own in OpenMail. Developer plan or higher:
                    any valid email address.
                attachments:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: File attachments (max 25 MB total per email)
      responses:
        '200':
          description: Email sent (or idempotent replay)
          content:
            application/json:
              schema:
                type: object
                properties:
                  messageId:
                    type: string
                  threadId:
                    type: string
                  providerMessageId:
                    type: string
                  status:
                    type: string
                    enum:
                      - pending
                      - sent
                      - failed
        '400':
          description: >-
            Missing Idempotency-Key, invalid 'to' address, or invalid 'replyTo'
            address
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Feature requires a paid plan. Returned when a free-plan customer
            sets `replyTo` to an address that is not one of their own OpenMail
            inboxes. Body includes `feature: "external_reply_to"`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Inbox or thread not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Recipient suppressed (bounce/complaint)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: >-
            Rate limit exceeded (global daily, per-inbox daily, per-inbox burst)
            or cold outreach limit. Check the Retry-After response header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API key

````