> ## Documentation Index
> Fetch the complete documentation index at: https://api-documentation.kare-app.fr/llms.txt
> Use this file to discover all available pages before exploring further.

# List inbox items



## OpenAPI

````yaml /api/rs/openapi.json get /rs/inbox-mails/v1/
openapi: 3.0.3
info:
  title: KARE API
  description: Backend API for the KARE platform
  version: dev
servers:
  - url: http://localhost:3000
    description: Local dev
security: []
tags:
  - name: better-auth
    description: >-
      Better Auth's own endpoints (sign-in, session, MFA, password) - generated
      from the audience's live config via `generateOpenAPISchema()`, not
      hand-written.
paths:
  /rs/inbox-mails/v1/:
    get:
      tags:
        - inbox
      summary: List inbox items
      operationId: listInboxMailsRSV1
      parameters:
        - schema:
            default: 1
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 9007199254740991
          in: query
          name: page
          required: false
        - schema:
            default: 50
            type: integer
            minimum: 0
            exclusiveMinimum: true
            maximum: 1000
          in: query
          name: pageSize
          required: false
        - schema:
            example: true
            anyOf:
              - type: boolean
          in: query
          name: countOnly
          required: false
          description: >-
            When true, answers `totalCount` with an empty `data`: the rows are
            never read, so no extend is selected and no transform runs. For a
            badge or a counter.
        - schema:
            type: array
            items:
              type: string
              enum:
                - items
              description: >-
                Extend options (JSON-encoded array, e.g.
                `?extend=["category"]`):

                - "items": Include the things to process in each mail - one per
                document attachment, each with its own type, status and report.
          in: query
          name: extend
          required: false
        - schema:
            type: array
            items:
              type: object
              properties:
                field:
                  type: string
                  enum:
                    - receivedAt
                    - fromEmail
                    - status
                    - createdAt
                    - updatedAt
                  description: >-
                    OrderBy options (JSON-encoded array, e.g.
                    `?orderBy=[{"field":"name","direction":"asc"}]`):

                    - "receivedAt": Order by reception date.

                    - "fromEmail": Order by sender email.

                    - "status": Order by status.

                    - "createdAt": Order by creation date.

                    - "updatedAt": Order by last update date.
                direction:
                  type: string
                  enum:
                    - asc
                    - desc
                  description: Sort direction
                  example: asc
              required:
                - field
                - direction
          in: query
          name: orderBy
          required: false
        - schema:
            maxItems: 250
            type: array
            items:
              type: string
              format: uuid
              pattern: >-
                ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
            example:
              - 550e8400-e29b-41d4-a716-446655440000
              - 6ba7b810-9dad-11d1-80b4-00c04fd430c8
          in: query
          name: whereIds
          required: false
          description: Filter by one or more inbox item ids.
        - schema:
            type: array
            items:
              type: string
            example:
              - received
              - rejected
          in: query
          name: whereStatus
          required: false
          description: Filter by the sender-gate verdict on the message.
        - schema:
            type: array
            items:
              type: string
            example:
              - unknown
              - report
          in: query
          name: whereItemType
          required: false
          description: Keep mails carrying at least one item of one of these types.
        - schema:
            type: array
            items:
              type: string
            example:
              - pending
              - processed
          in: query
          name: whereItemStatus
          required: false
          description: Keep mails carrying at least one item in one of these statuses.
        - schema:
            type: array
            items:
              type: string
            example:
              - sender_unknown
              - attachment_too_large
          in: query
          name: whereRejectionReason
          required: false
          description: Filter by one or more rejection reasons.
        - schema:
            type: string
            maxLength: 200
            example: lobby
          in: query
          name: whereSearch
          required: false
          description: >-
            Case-insensitive partial match on the subject, the body or the
            sender email.
        - schema:
            type: string
            maxLength: 200
            example: lobby
          in: query
          name: whereFromEmail
          required: false
          description: Filter by sender email (contains, case-insensitive).
        - schema:
            anyOf:
              - type: object
                properties:
                  start:
                    type: string
                  end:
                    type: string
              - type: object
                properties:
                  gte:
                    type: string
                  lte:
                    type: string
            example:
              start: '2026-01-01'
              end: '2026-01-31'
          in: query
          name: whereReceivedAt
          required: false
          description: Filter by reception date range.
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        organizationId:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        status:
                          type: string
                          enum:
                            - received
                            - rejected
                        rejectionReason:
                          nullable: true
                          type: string
                          enum:
                            - sender_unknown
                            - attachment_too_large
                            - attachment_type_not_allowed
                            - body_unreadable
                            - quota_exceeded
                        fromEmail:
                          type: string
                          format: email
                          pattern: >-
                            ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                        subject:
                          nullable: true
                          type: string
                          maxLength: 300
                        files:
                          type: array
                          items:
                            type: object
                            properties:
                              name:
                                type: string
                                minLength: 1
                                maxLength: 255
                              mimeType:
                                type: string
                                minLength: 1
                                maxLength: 100
                              size:
                                type: integer
                                minimum: 0
                                exclusiveMinimum: true
                                maximum: 1073741824
                              storageKey:
                                type: string
                                minLength: 1
                                maxLength: 512
                            required:
                              - name
                              - mimeType
                              - size
                              - storageKey
                            additionalProperties: false
                        receivedAt:
                          type: string
                          format: date-time
                        createdAt:
                          type: string
                          format: date-time
                        updatedAt:
                          type: string
                          format: date-time
                        items:
                          type: array
                          items:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              type:
                                type: string
                                enum:
                                  - unknown
                                  - report
                                  - quote
                              status:
                                type: string
                                enum:
                                  - pending
                                  - processed
                                  - dismissed
                              file:
                                type: object
                                properties:
                                  name:
                                    type: string
                                    minLength: 1
                                    maxLength: 255
                                  mimeType:
                                    type: string
                                    minLength: 1
                                    maxLength: 100
                                  size:
                                    type: integer
                                    minimum: 0
                                    exclusiveMinimum: true
                                    maximum: 1073741824
                                  storageKey:
                                    type: string
                                    minLength: 1
                                    maxLength: 512
                                required:
                                  - name
                                  - mimeType
                                  - size
                                  - storageKey
                                additionalProperties: false
                              reportId:
                                nullable: true
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              processedAt:
                                nullable: true
                                type: string
                                format: date-time
                              createdAt:
                                type: string
                                format: date-time
                            required:
                              - id
                              - type
                              - status
                              - file
                              - reportId
                              - processedAt
                              - createdAt
                            additionalProperties: false
                      required:
                        - id
                        - organizationId
                        - status
                        - rejectionReason
                        - fromEmail
                        - subject
                        - files
                        - receivedAt
                        - createdAt
                        - updatedAt
                      additionalProperties: false
                  totalCount:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                  pagination:
                    type: object
                    properties:
                      page:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        maximum: 9007199254740991
                      pageSize:
                        type: integer
                        minimum: 0
                        exclusiveMinimum: true
                        maximum: 9007199254740991
                      totalPages:
                        type: integer
                        minimum: 0
                        maximum: 9007199254740991
                    required:
                      - page
                      - pageSize
                      - totalPages
                    additionalProperties: false
                required:
                  - data
                  - totalCount
                  - pagination
                additionalProperties: false
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                  message:
                    type: string
                  requestId:
                    type: string
                  details: {}
                required:
                  - error
                  - message
                  - requestId
                additionalProperties: false

````