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

# List Inbound Emails

> Retrieve a paginated list of received inbound emails with filtering, search, and sorting options.



## OpenAPI

````yaml /openapi.json get /api/mailbox/
openapi: 3.1.0
info:
  title: e-invoice.be Peppol Access Point API
  version: 1.1.0
  x-logo:
    url: https://e-invoice.be/einvoice.svg
servers:
  - url: https://api.e-invoice.be
    description: Production
security: []
paths:
  /api/mailbox/:
    get:
      tags:
        - Mailbox
      summary: List Inbound Emails
      description: >-
        Retrieve a paginated list of received inbound emails with filtering,
        search, and sorting options.
      operationId: list_mailbox
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number
            default: 1
            title: Page
          description: Page number
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            description: Number of items per page
            default: 20
            title: Page Size
          description: Number of items per page
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - $ref: '#/components/schemas/InboundEmailStatus'
              - type: 'null'
            description: >-
              Filter by status: pending, success, or failed. Takes precedence
              over `processed` if both are provided.
            title: Status
          description: >-
            Filter by status: pending, success, or failed. Takes precedence over
            `processed` if both are provided.
        - name: processed
          in: query
          required: false
          schema:
            anyOf:
              - type: boolean
              - type: 'null'
            description: >-
              Filter by processing status. If not provided, returns all. Ignored
              when `status` is set.
            title: Processed
          description: >-
            Filter by processing status. If not provided, returns all. Ignored
            when `status` is set.
        - name: received_from
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Inclusive lower bound on received date (falls back to created_at
              when received_at is null)
            title: Received From
          description: >-
            Inclusive lower bound on received date (falls back to created_at
            when received_at is null)
        - name: received_to
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date-time
              - type: 'null'
            description: >-
              Inclusive upper bound on received date (falls back to created_at
              when received_at is null)
            title: Received To
          description: >-
            Inclusive upper bound on received date (falls back to created_at
            when received_at is null)
        - name: search
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Case-insensitive search across sender email, subject, message ID,
              and attachment filenames
            title: Search
          description: >-
            Case-insensitive search across sender email, subject, message ID,
            and attachment filenames
        - name: sort_by
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/InboundEmailSortField'
            description: Field to sort by
            default: received_at
          description: Field to sort by
        - name: sort_order
          in: query
          required: false
          schema:
            $ref: '#/components/schemas/SortOrder'
            description: Sort direction (asc/desc)
            default: desc
          description: Sort direction (asc/desc)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedResponse_InboundEmailResponse_'
        '401':
          description: 'Unauthorized: API key is missing, invalid, or inactive'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: 'Internal Server Error: Unexpected server error'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - HTTPBearer: []
components:
  schemas:
    InboundEmailStatus:
      type: string
      enum:
        - pending
        - success
        - failed
      title: InboundEmailStatus
    InboundEmailSortField:
      type: string
      enum:
        - received_at
        - created_at
      title: InboundEmailSortField
    SortOrder:
      type: string
      enum:
        - asc
        - desc
      title: SortOrder
      description: Sort order options.
    PaginatedResponse_InboundEmailResponse_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/InboundEmailResponse'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        page:
          type: integer
          title: Page
        page_size:
          type: integer
          title: Page Size
        pages:
          type: integer
          title: Pages
        has_next_page:
          type: boolean
          title: Has Next Page
      type: object
      required:
        - items
        - total
        - page
        - page_size
        - pages
        - has_next_page
      title: PaginatedResponse[InboundEmailResponse]
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error response model.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InboundEmailResponse:
      properties:
        id:
          type: string
          title: Id
        message_id:
          type: string
          title: Message Id
        sender_email:
          type: string
          title: Sender Email
        sender_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Sender Name
        to_addresses:
          anyOf:
            - type: string
            - type: 'null'
          title: To Addresses
        cc_addresses:
          anyOf:
            - type: string
            - type: 'null'
          title: Cc Addresses
        bcc_addresses:
          anyOf:
            - type: string
            - type: 'null'
          title: Bcc Addresses
        subject:
          anyOf:
            - type: string
            - type: 'null'
          title: Subject
        attachments:
          items:
            $ref: '#/components/schemas/AttachmentInfo'
          type: array
          title: Attachments
          default: []
        attachment_count:
          type: integer
          title: Attachment Count
          default: 0
        processed:
          type: boolean
          title: Processed
          default: false
        error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Message
        received_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Received At
        created_at:
          type: string
          format: date-time
          title: Created At
        processed_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Processed At
        document_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Document Id
      type: object
      required:
        - id
        - message_id
        - sender_email
        - created_at
      title: InboundEmailResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AttachmentInfo:
      properties:
        filename:
          type: string
          title: Filename
        size:
          anyOf:
            - type: integer
            - type: 'null'
          title: Size
        content_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Content Type
      type: object
      required:
        - filename
      title: AttachmentInfo
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````