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

# Get logs for all account domains

> Retrieves inbound logs across all domains and subdomains owned by the authenticated user/organization. Fans out requests to the logs API for each domain, merges results, and returns a unified sorted and paginated response. Supports the same filter parameters as the per-domain logs endpoint. Limited to 20 domains per request; use the domains parameter to target specific domains if you have more.



## OpenAPI

````yaml /openapi.json get /inbound/account/logs
openapi: 3.0.0
info:
  title: JetEmail API
  version: 1.0.0
  description: API documentation for JetEmail's transactional email service.
servers:
  - url: https://api.jetemail.com
    description: Production
security:
  - apiKeyAuth: []
externalDocs:
  description: Download OpenAPI Specification
  url: /openapi.json
paths:
  /inbound/account/logs:
    get:
      tags:
        - Inbound
      summary: Get logs for all account domains
      description: >-
        Retrieves inbound logs across all domains and subdomains owned by the
        authenticated user/organization. Fans out requests to the logs API for
        each domain, merges results, and returns a unified sorted and paginated
        response. Supports the same filter parameters as the per-domain logs
        endpoint. Limited to 20 domains per request; use the domains parameter
        to target specific domains if you have more.
      parameters:
        - name: domains
          in: query
          required: false
          schema:
            type: string
          description: >-
            Comma-separated list of domain names to filter to (e.g.
            "example.com,mail.example.com"). If omitted, queries all domains in
            the account (up to 20).
        - name: logtype
          in: query
          required: false
          schema:
            type: string
            enum:
              - spam
              - delivery
              - inbound
              - outbound
          description: Filter by log type
        - name: to
          in: query
          required: false
          schema:
            type: string
            format: email
          description: Filter by recipient email
        - name: from
          in: query
          required: false
          schema:
            type: string
            format: email
          description: Filter by sender email
        - name: subject
          in: query
          required: false
          schema:
            type: string
            maxLength: 500
          description: Filter by subject
        - name: ip
          in: query
          required: false
          schema:
            type: string
          description: Filter by IP address
        - name: date_from
          in: query
          required: false
          schema:
            type: integer
          description: Start of date range (Unix timestamp)
        - name: date_to
          in: query
          required: false
          schema:
            type: integer
          description: End of date range (Unix timestamp)
        - name: spamscore_min
          in: query
          required: false
          schema:
            type: number
          description: Minimum spam score filter
        - name: spamscore_max
          in: query
          required: false
          schema:
            type: number
          description: Maximum spam score filter
        - name: host
          in: query
          required: false
          schema:
            type: string
          description: Filter by host
        - name: port
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 65535
          description: Filter by port number
        - name: mode
          in: query
          required: false
          schema:
            type: string
            enum:
              - smtp
              - http
              - https
          description: Filter by connection mode
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 1000
            default: 100
          description: Number of entries to return (applied after merging all domains)
        - name: offset
          in: query
          required: false
          schema:
            type: integer
            minimum: 0
          description: Number of entries to skip
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
          description: Page number (alternative to offset, takes precedence)
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            default: date
          description: Field to sort by
        - name: sort_order
          in: query
          required: false
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: DESC
          description: Sort direction
      responses:
        '200':
          description: Successfully retrieved account-wide logs
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: array
                    description: >-
                      Merged and sorted consolidated log entries from all
                      queried domains. Each entry represents a single inbound
                      email (keyed by uid) with aggregated delivery/rejection
                      counts and an actions array of underlying log rows.
                      Entries are tagged with _domain, _domain_uuid, and
                      _domain_type identifying the source domain.
                    items:
                      type: object
                      properties:
                        _domain:
                          type: string
                          description: Domain this log entry belongs to
                          example: example.com
                        _domain_uuid:
                          type: string
                          description: UUID of the domain this entry belongs to
                          example: 550e8400-e29b-41d4-a716-446655440000
                        _domain_type:
                          type: string
                          enum:
                            - domain
                            - subdomain
                          description: Whether this is a domain or subdomain
                        uid:
                          type: string
                          description: Unique identifier for the email
                          example: 67020a88e9ab3a023e12
                        status:
                          type: string
                          description: >-
                            Overall status of the email across all actions (e.g.
                            delivered, rejected, pending)
                          example: delivered
                        from:
                          type: string
                          description: Sender email address
                          example: sender@example.com
                        to:
                          type: string
                          description: Recipient email address
                          example: recipient@example.com
                        subject:
                          type: string
                          description: Email subject
                          example: 'Re: Online afspraken'
                        rejected_count:
                          type: integer
                          description: >-
                            Number of rejected delivery attempts aggregated into
                            this entry
                          example: 12
                        delivery_count:
                          type: integer
                          description: >-
                            Number of successful delivery attempts aggregated
                            into this entry
                          example: 1
                        delivered_timestamp:
                          type: integer
                          format: int64
                          description: >-
                            Millisecond Unix timestamp of the successful
                            delivery. 0 or null if never delivered.
                          example: 1776972847891
                        rejected_response:
                          type: string
                          description: >-
                            Representative SMTP response for the most recent
                            rejection, if any
                          example: 'RCPT TO failed for info@example.com: 450 4.1.8 ...'
                        response:
                          type: string
                          description: >-
                            Representative SMTP response for the successful
                            delivery, if any
                          example: '250 2.0.0 Ok: queued as 638B63A5AD5'
                        actions:
                          type: array
                          description: >-
                            Individual log actions that make up this
                            consolidated entry, in chronological order. Each
                            item is a single underlying log row (inbound
                            receipt, rejection, delivery attempt, spam
                            evaluation, etc.).
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                description: Unique identifier for this action row
                                example: bc1ca372-0000-0000-0000-000000000000
                              logtype:
                                type: string
                                description: >-
                                  Type of action. Known values include: inbound,
                                  delivery, REJECTED, spam, outbound.
                                example: inbound
                              response:
                                type: string
                                description: SMTP or processing response for this action
                                example: '250 2.0.0 Ok: queued as 638B63A5AD5'
                              date:
                                type: integer
                                format: int64
                                description: Millisecond Unix timestamp of the action
                                example: 1776933973950
                              timestamp:
                                type: string
                                format: date-time
                                description: ISO-8601 timestamp of the action
                                example: '2026-04-23T08:46:13.950Z'
                              host:
                                type: string
                                description: Host involved in the action
                                example: ''
                              ip:
                                type: string
                                description: IP address associated with the action
                                example: ''
                              port:
                                type: integer
                                description: Port number used
                                example: 0
                              mode:
                                type: string
                                description: Connection mode (smtp, http, https)
                                example: ''
                              delay:
                                type: number
                                description: Delay in seconds before this action
                                example: 0
                              spam_score:
                                type: number
                                description: Spam score evaluated for this action
                                example: 0
                              spam_report:
                                type: string
                                description: Spam report text for this action
                                example: ''
                  pagination:
                    type: object
                    properties:
                      total:
                        type: integer
                        description: Total entries across all domains (before pagination)
                        example: 450
                      limit:
                        type: integer
                        example: 100
                      offset:
                        type: integer
                        example: 0
                      returned:
                        type: integer
                        description: Number of entries in this response
                        example: 100
                  domains_queried:
                    type: array
                    description: Status of each domain query
                    items:
                      type: object
                      properties:
                        domain:
                          type: string
                          example: example.com
                        domain_uuid:
                          type: string
                        domain_type:
                          type: string
                          enum:
                            - domain
                            - subdomain
                        count:
                          type: integer
                          description: Number of entries returned for this domain
                        status:
                          type: string
                          enum:
                            - success
                            - error
                  total_domains:
                    type: integer
                    description: Total number of domains in the account
                    example: 5
                  domains_included:
                    type: integer
                    description: Number of domains actually queried (may be capped at 20)
                    example: 5
        '400':
          description: Bad Request - Invalid filter parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: >-
                      Invalid logtype value. Must be: spam, delivery, inbound,
                      or outbound
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: User authentication not found
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Failed to fetch account inbound logs
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````