> ## 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.

# List all emails

> List all email activity (sent, received, and scheduled) with comprehensive filtering options.



## OpenAPI

````yaml https://app.stainless.com/api/spec/documented/inbound/openapi.documented.yml get /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:
    get:
      tags:
        - Emails
      summary: List all emails
      description: >-
        List all email activity (sent, received, and scheduled) with
        comprehensive filtering options.
      operationId: getApiE2Emails
      parameters:
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - all
              - sent
              - received
              - scheduled
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - all
              - delivered
              - pending
              - failed
              - bounced
              - scheduled
              - cancelled
              - unread
              - read
              - archived
        - name: time_range
          in: query
          required: false
          schema:
            type: string
            enum:
              - 1h
              - 24h
              - 7d
              - 30d
              - 90d
              - all
        - name: search
          in: query
          required: false
          schema:
            description: >-
              Search query to filter emails by subject, sender, or recipient.
              Case-insensitive partial match.
            type: string
        - name: domain
          in: query
          required: false
          schema:
            description: >-
              Filter by domain. Accepts domain ID (e.g., 'dom_xxx') or domain
              name (e.g., 'example.com').
            type: string
        - name: address
          in: query
          required: false
          schema:
            description: >-
              Filter by email address. Accepts address ID (e.g., 'addr_xxx') or
              raw email address (e.g., 'user@example.com').
            type: string
        - name: limit
          in: query
          required: false
          schema:
            description: Maximum number of emails to return (1-100). Default is 50.
            default: '50'
            type: string
        - name: offset
          in: query
          required: false
          schema:
            description: Number of emails to skip for pagination. Default is 0.
            default: '0'
            type: string
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    description: Array of email objects matching the query
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          description: Unique identifier for the email
                          type: string
                        type:
                          type: string
                          enum:
                            - sent
                            - received
                            - scheduled
                        message_id:
                          nullable: true
                          anyOf:
                            - description: RFC 2822 Message-ID header value
                              type: string
                            - type: 'null'
                        from:
                          description: Sender email address
                          type: string
                        from_name:
                          nullable: true
                          anyOf:
                            - description: Sender display name if available
                              type: string
                            - type: 'null'
                        to:
                          description: Array of recipient email addresses
                          type: array
                          items:
                            type: string
                        cc:
                          description: Array of CC recipient email addresses
                          type: array
                          items:
                            type: string
                        subject:
                          description: Email subject line
                          type: string
                        preview:
                          nullable: true
                          anyOf:
                            - description: >-
                                First 200 characters of the email body as a
                                preview
                              type: string
                            - type: 'null'
                        status:
                          description: >-
                            Current status of the email (delivered, pending,
                            failed, bounced, scheduled, cancelled)
                          type: string
                        created_at:
                          description: >-
                            ISO 8601 timestamp when the email was
                            created/received
                          type: string
                        sent_at:
                          nullable: true
                          anyOf:
                            - description: ISO 8601 timestamp when the email was sent
                              type: string
                            - type: 'null'
                        scheduled_at:
                          nullable: true
                          anyOf:
                            - description: >-
                                ISO 8601 timestamp when the email is scheduled
                                to be sent
                              type: string
                            - type: 'null'
                        has_attachments:
                          description: Whether the email has any attachments
                          type: boolean
                        attachment_count:
                          description: Number of attachments on the email
                          type: number
                        is_read:
                          description: >-
                            Whether the email has been read (only for received
                            emails)
                          type: boolean
                        read_at:
                          nullable: true
                          anyOf:
                            - description: >-
                                ISO 8601 timestamp when the email was marked as
                                read (only for received emails)
                              type: string
                            - type: 'null'
                        is_archived:
                          description: >-
                            Whether the email has been archived (only for
                            received emails)
                          type: boolean
                        thread_id:
                          nullable: true
                          anyOf:
                            - description: >-
                                ID of the thread this email belongs to, if
                                threaded
                              type: string
                            - type: 'null'
                      required:
                        - id
                        - type
                        - from
                        - to
                        - subject
                        - status
                        - created_at
                        - has_attachments
                  pagination:
                    description: Pagination metadata
                    type: object
                    properties:
                      limit:
                        description: Number of results per page
                        type: number
                      offset:
                        description: Number of results skipped
                        type: number
                      total:
                        description: Total number of matching emails
                        type: number
                      has_more:
                        description: Whether there are more results available
                        type: boolean
                    required:
                      - limit
                      - offset
                      - total
                      - has_more
                  filters:
                    description: Applied filters for this query
                    type: object
                    properties:
                      type:
                        description: Applied type filter
                        type: string
                      status:
                        description: Applied status filter
                        type: string
                      time_range:
                        description: Applied time range filter
                        type: string
                      search:
                        description: Applied search query
                        type: string
                      domain:
                        description: Applied domain filter
                        type: string
                      address:
                        description: Applied address filter
                        type: string
                required:
                  - data
                  - pagination
                  - filters
        '400':
          description: Response for status 400
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Error message describing what went wrong
                    type: string
                required:
                  - error
        '401':
          description: Response for status 401
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Error message describing what went wrong
                    type: string
                required:
                  - error
        '500':
          description: Response for status 500
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Error message describing what went wrong
                    type: string
                required:
                  - error
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Inbound from 'inboundemail';

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

            const emails = await client.emails.list();

            console.log(emails.data);
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>

````