> ## 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 activity for all mailboxes

> Sign-ins, refused sign-ins, IMAP sessions, command errors and send failures for every mailbox in the account, newest first. Kept for 30 days. Account API key only.



## OpenAPI

````yaml https://inbound.new/openapi.json get /api/e2/mailboxes/activity
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/mailboxes/activity:
    get:
      tags:
        - Mailboxes
      summary: List activity for all mailboxes
      description: >-
        Sign-ins, refused sign-ins, IMAP sessions, command errors and send
        failures for every mailbox in the account, newest first. Kept for 30
        days. Account API key only.
      operationId: getApiE2MailboxesActivity
      parameters:
        - name: event
          in: query
          required: false
          schema:
            type: string
            enum:
              - login_succeeded
              - login_failed
              - login_refused
              - session_ended
              - command_error
              - quota_exceeded
              - send_failed
              - send_rate_limited
              - events_dropped
        - name: protocol
          in: query
          required: false
          schema:
            type: string
            enum:
              - imap
              - smtp
              - api
        - name: since
          in: query
          required: false
          schema:
            description: Only events at or after this ISO 8601 time
            type: string
        - name: until
          in: query
          required: false
          schema:
            description: Only events at or before this ISO 8601 time
            type: string
        - name: ip
          in: query
          required: false
          schema:
            maxLength: 64
            description: Only events from this client IP
            type: string
        - name: limit
          in: query
          required: false
          schema:
            minimum: 1
            maximum: 100
            default: 50
            anyOf:
              - format: integer
                default: 0
                type: string
              - minimum: 1
                maximum: 100
                default: 50
                type: integer
        - name: offset
          in: query
          required: false
          schema:
            minimum: 0
            default: 0
            anyOf:
              - format: integer
                default: 0
                type: string
              - minimum: 0
                default: 0
                type: integer
        - name: mailboxId
          in: query
          required: false
          schema:
            maxLength: 255
            description: Only this mailbox's events
            type: string
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                        mailboxId:
                          type: string
                        occurredAt:
                          format: date-time
                          type: string
                        lastOccurredAt:
                          format: date-time
                          description: When the last repeat counted in `count` happened
                          type: string
                        protocol:
                          type: string
                          enum:
                            - imap
                            - smtp
                            - api
                        event:
                          type: string
                          enum:
                            - login_succeeded
                            - login_failed
                            - login_refused
                            - session_ended
                            - command_error
                            - quota_exceeded
                            - send_failed
                            - send_rate_limited
                            - events_dropped
                        reason:
                          nullable: true
                          anyOf:
                            - type: string
                            - type: 'null'
                        clientIp:
                          nullable: true
                          anyOf:
                            - type: string
                            - type: 'null'
                        client:
                          nullable: true
                          anyOf:
                            - description: IMAP ID or user agent
                              type: string
                            - type: 'null'
                        count:
                          description: How many times this event repeated
                          anyOf:
                            - format: integer
                              default: 0
                              type: string
                            - description: How many times this event repeated
                              type: integer
                        detail:
                          nullable: true
                          anyOf:
                            - description: >-
                                Small event-specific details, e.g. `status`,
                                `message`, `durationMs`, `commands`,
                                `sentEmailId`, `limit`
                              type: object
                              patternProperties:
                                ^(.*)$:
                                  anyOf:
                                    - type: string
                                    - type: number
                                    - type: boolean
                            - type: 'null'
                      required:
                        - id
                        - mailboxId
                        - occurredAt
                        - lastOccurredAt
                        - protocol
                        - event
                        - reason
                        - clientIp
                        - client
                        - count
                        - detail
                  pagination:
                    type: object
                    properties:
                      limit:
                        type: number
                      offset:
                        type: number
                      total:
                        type: number
                      hasMore:
                        type: boolean
                    required:
                      - limit
                      - offset
                      - total
                      - hasMore
                required:
                  - data
                  - pagination
        '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
        '404':
          description: Response for status 404
          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.activity.list({
              limit: 50,
              offset: 0
            });

            // Or iterate through all pages:
            for await (const item of inbound.activity.listAll()) {
              // Process this item.
            }
        - lang: curl
          label: cURL
          source: >-
            curl -X GET
            'https://inbound.new/api/e2/mailboxes/activity?limit=50&offset=0' \
              -H "Authorization: Bearer $INBOUND_API_KEY"
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.