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

# Send a message



## OpenAPI

````yaml POST /messages
openapi: 3.1.0
info:
  title: SentFromAI API
  version: 0.1.0
  description: >-
    Comms infrastructure for AI agents. Email send/receive, threading,
    attachments, drafts, webhooks, realtime, and search.
servers:
  - url: https://api.sentfrom.ai/v1
security:
  - bearerAuth: []
tags:
  - name: inboxes
  - name: messages
  - name: threads
  - name: drafts
  - name: webhooks
  - name: labels
  - name: lists
  - name: attachments
  - name: domains
    description: Custom sending domains
paths:
  /messages:
    post:
      tags:
        - messages
      summary: Send a message
      operationId: sendMessage
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendMessage'
      responses:
        '201':
          description: Sent
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SendResult'
        '422':
          description: All recipients suppressed or blocked
components:
  schemas:
    SendMessage:
      type: object
      required:
        - inbox_id
        - to
        - subject
      properties:
        inbox_id:
          type: string
        to:
          type: array
          items:
            type: string
        cc:
          type: array
          items:
            type: string
        bcc:
          type: array
          items:
            type: string
        subject:
          type: string
        text:
          type: string
        html:
          type: string
        in_reply_to:
          type: string
        references:
          type: array
          items:
            type: string
        client_id:
          type: string
        attachments:
          type: array
          items:
            $ref: '#/components/schemas/Attachment'
    SendResult:
      type: object
      properties:
        id:
          type: string
        thread_id:
          type: string
        message_id:
          type: string
        ses_message_id:
          type: string
        idempotent:
          type: boolean
    Attachment:
      type: object
      properties:
        filename:
          type:
            - string
            - 'null'
        content_type:
          type: string
        content_base64:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````