> ## 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 outbound email logs

> Retrieves logs of outbound email activity with comprehensive filtering options



## OpenAPI

````yaml /openapi.json get /outbound/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:
  /outbound/logs:
    get:
      tags:
        - Outbound
      summary: Get outbound email logs
      description: >-
        Retrieves logs of outbound email activity with comprehensive filtering
        options
      parameters:
        - name: limit
          in: query
          description: Number of records to return (1-100)
          schema:
            type: integer
            minimum: 1
            maximum: 100
            default: 50
        - name: page
          in: query
          description: Page number for pagination (starts from 1)
          schema:
            type: integer
            minimum: 1
            default: 1
        - name: offset
          in: query
          description: Number of records to skip (alternative to page)
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: sort_by
          in: query
          description: Field to sort by
          schema:
            type: string
            default: date
            maxLength: 50
        - name: sort_order
          in: query
          description: Sort order
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: DESC
        - name: id
          in: query
          description: Filter by record ID
          schema:
            type: string
            maxLength: 100
        - name: uid
          in: query
          description: Filter by unique identifier
          schema:
            type: string
            pattern: ^[A-Za-z0-9-_]{1,100}$
        - name: action
          in: query
          description: Filter by email action status
          schema:
            type: string
            enum:
              - ACCEPTED
              - REJECTED
              - BOUNCED_HARD
              - BOUNCED_SOFT
              - DEFERRED
              - SPAM
              - VIRUS
              - QUEUED
        - name: zone
          in: query
          description: Filter by zone
          schema:
            type: string
            maxLength: 50
        - name: message_id
          in: query
          description: Filter by message ID
          schema:
            type: string
            maxLength: 100
        - name: from_address
          in: query
          description: Filter by sender email address
          schema:
            type: string
            format: email
        - name: to_address
          in: query
          description: Filter by recipient email address
          schema:
            type: string
            format: email
        - name: mx
          in: query
          description: Filter by MX server
          schema:
            type: string
            maxLength: 100
        - name: host
          in: query
          description: Filter by host server
          schema:
            type: string
            maxLength: 100
        - name: ip
          in: query
          description: Filter by IP address
          schema:
            type: string
            pattern: >-
              ^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$
        - name: response
          in: query
          description: Filter by server response
          schema:
            type: string
            maxLength: 500
        - name: user
          in: query
          description: Filter by username
          schema:
            type: string
            format: email
        - name: protocol
          in: query
          description: Filter by protocol
          schema:
            type: string
            enum:
              - smtp
              - http
              - https
        - name: src
          in: query
          description: Filter by source
          schema:
            type: string
            maxLength: 50
        - name: subject
          in: query
          description: Filter by email subject
          schema:
            type: string
            maxLength: 500
        - name: md5
          in: query
          description: Filter by MD5 hash
          schema:
            type: string
            pattern: ^[a-fA-F0-9]{32}$
        - name: interface
          in: query
          description: Filter by interface
          schema:
            type: string
            maxLength: 50
        - name: originhost
          in: query
          description: Filter by origin host
          schema:
            type: string
            maxLength: 100
        - name: transtype
          in: query
          description: Filter by transport type
          schema:
            type: string
            enum:
              - smtp
              - http
              - api
        - name: headerFrom
          in: query
          description: Filter by header From field
          schema:
            type: string
            format: email
        - name: date_from
          in: query
          description: Filter by start date (Unix timestamp)
          schema:
            type: integer
            minimum: 0
        - name: date_to
          in: query
          description: Filter by end date (Unix timestamp)
          schema:
            type: integer
            minimum: 0
        - name: from
          in: query
          description: Filter by start date (YYYY-MM-DD or ISO format)
          schema:
            type: string
            format: date
        - name: to
          in: query
          description: Filter by end date (YYYY-MM-DD or ISO format)
          schema:
            type: string
            format: date
        - name: rule_id
          in: query
          description: Filter by rule ID
          schema:
            type: string
            maxLength: 100
        - name: search
          in: query
          description: General search term (searches across email fields)
          schema:
            type: string
            maxLength: 200
      responses:
        '200':
          description: Successfully retrieved logs grouped by message uid
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  pagination:
                    type: object
                    properties:
                      total_count:
                        type: integer
                        description: Total number of matching messages
                      total_pages:
                        type: integer
                      current_page:
                        type: integer
                      per_page:
                        type: integer
                      offset:
                        type: integer
                      has_next_page:
                        type: boolean
                      has_previous_page:
                        type: boolean
                      next_offset:
                        type: integer
                        nullable: true
                      previous_offset:
                        type: integer
                        nullable: true
                      showing_from:
                        type: integer
                      showing_to:
                        type: integer
                      count_limited:
                        type: boolean
                        description: >-
                          True when total_count was truncated at
                          max_count_limit; the real total may be higher
                      max_count_limit:
                        type: integer
                  data:
                    type: array
                    description: >-
                      One entry per message, aggregated from all events recorded
                      against its uid
                    items:
                      type: object
                      properties:
                        uid:
                          type: string
                          example: abc123
                          description: Unique message identifier
                        id:
                          type: string
                        message_id:
                          type: string
                        subject:
                          type: string
                        from_address:
                          type: string
                          format: email
                        to_address:
                          type: string
                          format: email
                        sender:
                          type: string
                        receiver:
                          type: string
                        user:
                          type: string
                        src:
                          type: string
                        originhost:
                          type: string
                        transtype:
                          type: string
                        headerFrom:
                          type: string
                        rule_id:
                          type: string
                        first_seen:
                          type: integer
                          format: int64
                          description: >-
                            Milliseconds since epoch when the message was first
                            recorded
                        last_updated:
                          type: integer
                          format: int64
                          description: >-
                            Milliseconds since epoch of the most recent event
                            for this message
                        action_count:
                          type: integer
                          description: Total number of events recorded against this message
                        delivery_status:
                          type: string
                          enum:
                            - queued_pending
                            - deferred
                            - delivered
                            - opened
                            - clicked
                            - bounced
                            - rejected
                            - dropped
                            - spam
                            - virus_detected
                            - unknown
                          description: Overall message status
                        was_queued:
                          type: integer
                          enum:
                            - 0
                            - 1
                        was_delivered:
                          type: integer
                          enum:
                            - 0
                            - 1
                        was_deferred:
                          type: integer
                          enum:
                            - 0
                            - 1
                        was_rejected:
                          type: integer
                          enum:
                            - 0
                            - 1
                        was_bounced:
                          type: integer
                          enum:
                            - 0
                            - 1
                        was_dropped:
                          type: integer
                          enum:
                            - 0
                            - 1
                        was_spam:
                          type: integer
                          enum:
                            - 0
                            - 1
                        was_virus:
                          type: integer
                          enum:
                            - 0
                            - 1
                        was_opened:
                          type: integer
                          enum:
                            - 0
                            - 1
                          description: 1 if the message has been opened at least once
                        was_clicked:
                          type: integer
                          enum:
                            - 0
                            - 1
                          description: >-
                            1 if a tracked link in the message has been clicked
                            at least once
                        final_mx:
                          type: string
                          description: MX server used for the final delivery attempt
                        final_host:
                          type: string
                          description: Receiving host of the final delivery attempt
                        final_ip:
                          type: string
                          description: IP of the final delivery attempt
                        final_protocol:
                          type: string
                        final_response:
                          type: string
                          description: Server response from the final delivery attempt
                        bounce_reason:
                          type: string
                          nullable: true
                          description: Response body of the bounce, if the message bounced
                        bounce_mx:
                          type: string
                          nullable: true
                        bounce_host:
                          type: string
                          nullable: true
                        delivery_attempts:
                          type: array
                          description: >-
                            Every delivery attempt against this message, oldest
                            first
                          items:
                            type: object
                            properties:
                              action:
                                type: string
                                description: >-
                                  Outcome of this attempt (ACCEPTED, DELIVERED,
                                  DEFERRED, REJECTED, BOUNCED_HARD,
                                  BOUNCED_SOFT, BOUNCED_UNKNOWN, DROP, DROPPED)
                              receiver:
                                type: string
                              mx:
                                type: string
                              host:
                                type: string
                              ip:
                                type: string
                              response:
                                type: string
                              protocol:
                                type: string
                              date:
                                type: integer
                                format: int64
                                description: Milliseconds since epoch
                              timestamp:
                                type: string
                                format: date-time
                                description: Same instant as `date`, in RFC3339 form
                        delivery_summary:
                          type: object
                          properties:
                            total_attempts:
                              type: integer
                            successful_deliveries:
                              type: integer
                            failed_deliveries:
                              type: integer
                            unique_recipients:
                              type: integer
                        opens:
                          type: array
                          description: >-
                            Every recorded open of the message, oldest first.
                            Absent if the message has not been opened.
                          items:
                            type: object
                            required:
                              - date
                            properties:
                              date:
                                type: integer
                                format: int64
                                description: >-
                                  Milliseconds since epoch when the open
                                  occurred
                              country:
                                type: string
                                description: >-
                                  Approximate location of the reader (e.g.
                                  "Brisbane, QLD, AU")
                              email_client:
                                type: string
                                description: >-
                                  Email client that loaded the message (e.g.
                                  "Gmail", "Outlook (web)")
                        clicks:
                          type: array
                          description: >-
                            Every recorded click on a tracked link in the
                            message, oldest first. Absent if no links have been
                            clicked.
                          items:
                            type: object
                            required:
                              - date
                            properties:
                              date:
                                type: integer
                                format: int64
                                description: >-
                                  Milliseconds since epoch when the click
                                  occurred
                              country:
                                type: string
                                description: Approximate location of the clicker
                              email_client:
                                type: string
                                description: Browser or email client that made the request
                              original_url:
                                type: string
                                description: >-
                                  Destination URL of the clicked link, when
                                  known
        '400':
          description: Bad Request - Invalid parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Invalid parameter format
        '401':
          description: Unauthorized - User not authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: User authentication, log location, or db_uuid 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 outbound logs
                  details:
                    type: string
                    description: Additional error details
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````