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

# Send an email

> Send an email immediately or schedule it for later using the scheduled_at parameter. Supports HTML/text content, attachments, and custom headers.



## OpenAPI

````yaml https://inbound.new/openapi.json post /api/e2/emails
openapi: 3.1.0
info:
  title: Inbound Email API
  description: >+

    # Inbound API


    The Inbound API allows you to manage email infrastructure programmatically -
    domains, email addresses, webhooks, and more.


    ## Authentication


    All API requests require a Bearer token in the Authorization header:


    ```bash

    curl -H "Authorization: Bearer YOUR_API_KEY" \
      https://inbound.new/api/e2/domains
    ```


    ## Base URL


    ```

    https://inbound.new/api/e2

    ```


    ## Quick Start


    1. **Create a domain** - Register your domain with Inbound

    2. **Configure DNS** - Add the provided DNS records to your domain

    3. **Create an email address** - Set up addresses to receive emails

    4. **Create an endpoint** - Configure where emails are delivered (webhook,
    forwarding, etc.)

  version: 2.0.0
servers:
  - url: https://inbound.new
    description: Production API server
security:
  - bearerAuth: []
tags:
  - name: Webhooks
    description: Webhooks sent by Inbound to your configured endpoints when events occur.
  - name: Emails
    description: >-
      Send, list, and manage emails. Supports immediate sending, scheduling,
      replies, and retry functionality.
  - name: Mail
    description: >-
      Inbox and thread views for received emails. Filter by domain, address, or
      search.
  - name: Domains
    description: >-
      Manage domains for sending and receiving emails. Domains must be verified
      via DNS before use.
  - name: Endpoints
    description: >-
      Configure where incoming emails are delivered - webhooks, email
      forwarding, or custom handlers.
  - name: Email Addresses
    description: Create and manage email addresses on your verified domains.
  - name: Attachments
    description: Download email attachments using authenticated requests.
paths:
  /api/e2/emails:
    post:
      tags:
        - Emails
      summary: Send an email
      description: >-
        Send an email immediately or schedule it for later using the
        scheduled_at parameter. Supports HTML/text content, attachments, and
        custom headers.
      operationId: postApiE2Emails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                from:
                  description: Sender email address
                  type: string
                to:
                  description: Recipient email address(es)
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                subject:
                  description: Email subject
                  type: string
                html:
                  description: HTML content of the email
                  type: string
                text:
                  description: Plain text content of the email
                  type: string
                cc:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                bcc:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                reply_to:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                headers:
                  description: Custom email headers
                  type: object
                  patternProperties:
                    ^(.*)$:
                      type: string
                attachments:
                  type: array
                  items:
                    type: object
                    properties:
                      filename:
                        description: Filename shown to the recipient
                        type: string
                      content:
                        description: Base64-encoded file content
                        type: string
                      content_type:
                        type: string
                      content_id:
                        maxLength: 128
                        type: string
                      path:
                        description: Public or signed URL for Inbound to fetch
                        type: string
                    required:
                      - filename
                tags:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      value:
                        type: string
                    required:
                      - name
                      - value
                message_id:
                  minLength: 3
                  maxLength: 500
                  description: >-
                    Client Message-ID retained in the mailbox's Sent copy, e.g.
                    <id@example.com>. SES assigns its own delivery Message-ID.
                    Generated for mailbox sends when omitted.
                  type: string
                scheduled_at:
                  description: ISO 8601 date or natural language for scheduling
                  type: string
                timezone:
                  description: Timezone for natural language parsing
                  type: string
              required:
                - from
                - to
                - subject
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                from:
                  description: Sender email address
                  type: string
                to:
                  description: Recipient email address(es)
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                subject:
                  description: Email subject
                  type: string
                html:
                  description: HTML content of the email
                  type: string
                text:
                  description: Plain text content of the email
                  type: string
                cc:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                bcc:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                reply_to:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                headers:
                  description: Custom email headers
                  type: object
                  patternProperties:
                    ^(.*)$:
                      type: string
                attachments:
                  type: array
                  items:
                    type: object
                    properties:
                      filename:
                        description: Filename shown to the recipient
                        type: string
                      content:
                        description: Base64-encoded file content
                        type: string
                      content_type:
                        type: string
                      content_id:
                        maxLength: 128
                        type: string
                      path:
                        description: Public or signed URL for Inbound to fetch
                        type: string
                    required:
                      - filename
                tags:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      value:
                        type: string
                    required:
                      - name
                      - value
                message_id:
                  minLength: 3
                  maxLength: 500
                  description: >-
                    Client Message-ID retained in the mailbox's Sent copy, e.g.
                    <id@example.com>. SES assigns its own delivery Message-ID.
                    Generated for mailbox sends when omitted.
                  type: string
                scheduled_at:
                  description: ISO 8601 date or natural language for scheduling
                  type: string
                timezone:
                  description: Timezone for natural language parsing
                  type: string
              required:
                - from
                - to
                - subject
          multipart/form-data:
            schema:
              type: object
              properties:
                from:
                  description: Sender email address
                  type: string
                to:
                  description: Recipient email address(es)
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                subject:
                  description: Email subject
                  type: string
                html:
                  description: HTML content of the email
                  type: string
                text:
                  description: Plain text content of the email
                  type: string
                cc:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                bcc:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                reply_to:
                  anyOf:
                    - type: string
                    - type: array
                      items:
                        type: string
                headers:
                  description: Custom email headers
                  type: object
                  patternProperties:
                    ^(.*)$:
                      type: string
                attachments:
                  type: array
                  items:
                    type: object
                    properties:
                      filename:
                        description: Filename shown to the recipient
                        type: string
                      content:
                        description: Base64-encoded file content
                        type: string
                      content_type:
                        type: string
                      content_id:
                        maxLength: 128
                        type: string
                      path:
                        description: Public or signed URL for Inbound to fetch
                        type: string
                    required:
                      - filename
                tags:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      value:
                        type: string
                    required:
                      - name
                      - value
                message_id:
                  minLength: 3
                  maxLength: 500
                  description: >-
                    Client Message-ID retained in the mailbox's Sent copy, e.g.
                    <id@example.com>. SES assigns its own delivery Message-ID.
                    Generated for mailbox sends when omitted.
                  type: string
                scheduled_at:
                  description: ISO 8601 date or natural language for scheduling
                  type: string
                timezone:
                  description: Timezone for natural language parsing
                  type: string
              required:
                - from
                - to
                - subject
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  message_id:
                    type: string
                  scheduled_at:
                    type: string
                  status:
                    type: string
                    enum:
                      - sent
                      - scheduled
                  timezone:
                    type: string
                required:
                  - id
        '400':
          description: Response for status 400
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '403':
          description: Response for status 403
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '409':
          description: Response for status 409
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '422':
          description: Response for status 422
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '429':
          description: Response for status 429
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      x-codeSamples:
        - lang: typescript
          label: TypeScript
          source: |-
            import Inbound from "inboundemail";

            const inbound = new Inbound();
            const result = await inbound.emails.send({
              from: "agent@example.com",
              to: "alex@example.com",
              subject: "Your support request",
              text: "How can we help?"
            });
        - lang: curl
          label: cURL
          source: |-
            curl -X POST 'https://inbound.new/api/e2/emails' \
              -H "Authorization: Bearer $INBOUND_API_KEY" \
              -H 'Content-Type: application/json' \
              -d '{
              "from": "agent@example.com",
              "to": "alex@example.com",
              "subject": "Your support request",
              "text": "How can we help?"
            }'
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        Your Inbound API key. Include it in the Authorization header as: Bearer
        <your-api-key>

````

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