> ## 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 the things to process received by mail



## OpenAPI

````yaml /api/rs/openapi.json get /rs/inbox-items/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-items/v1/:
    get:
      tags:
        - inbox-items
      summary: List the things to process received by mail
      operationId: listInboxItemsRSV1
      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:
                - mail
                - actions-info
                - download-url
                - latest-analysis
                - sender-provider
                - report
              description: >-
                Extend options (JSON-encoded array, e.g.
                `?extend=["category"]`):

                - "mail": Include the mail this item came out of (door, sender,
                subject, reception date).

                - "actions-info": Adds `actions` { canBeDismissed, canBeDeleted,
                canBecomeReport }.

                - "download-url": Adds a presigned `downloadUrl` for the item's
                file, before any conversion.

                - "latest-analysis": Newest analysis run of the item (null when
                it has none), with the provider and unit its succeeded
                `metadata` step retained and the score each was retained on.

                - "sender-provider": Provider the sending address belongs to,
                when exactly one live contact of the organization carries it -
                the attribution that comes from the mail thread rather than from
                the document. Null when no contact, or contacts of several
                providers, answer to that address.

                - "report": Report this item became (null while it is still
                unprocessed), named by its document and placed on the first unit
                its compliances cover.
          in: query
          name: extend
          required: false
        - schema:
            type: array
            items:
              type: object
              properties:
                field:
                  type: string
                  enum:
                    - receivedAt
                    - type
                    - status
                    - createdAt
                    - updatedAt
                  description: >-
                    OrderBy options (JSON-encoded array, e.g.
                    `?orderBy=[{"field":"name","direction":"asc"}]`):

                    - "receivedAt": Order by the reception date of the mail.

                    - "type": Order by document type.

                    - "status": Order by processing 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:
            type: string
            maxLength: 200
            example: lobby
          in: query
          name: whereSearch
          required: false
          description: >-
            Case-insensitive partial match on the carrying mail's subject or
            sender address.
        - 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:
              - unknown
              - report
          in: query
          name: whereType
          required: false
          description: Filter by what the received document is.
        - schema:
            type: array
            items:
              type: string
            example:
              - pending
              - processed
          in: query
          name: whereStatus
          required: false
          description: Filter by processing status - `pending` is the work queue.
        - schema:
            type: array
            items:
              type: string
            example:
              - email
              - import
          in: query
          name: whereSource
          required: false
          description: >-
            Filter by the door the document came through - a provider mail, or a
            manual import.
        - 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: whereMailIds
          required: false
          description: Filter by the mail the items came out of.
        - schema:
            type: string
            maxLength: 200
            example: lobby
          in: query
          name: whereFromEmail
          required: false
          description: Filter by the sender of the mail (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 the reception date of the mail.
      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)$
                        inboxMailId:
                          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)$
                        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
                        classifyParked:
                          type: boolean
                        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
                        updatedAt:
                          type: string
                          format: date-time
                        inboxMail:
                          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)$
                            source:
                              type: string
                              enum:
                                - email
                                - import
                            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
                            receivedAt:
                              type: string
                              format: date-time
                          required:
                            - id
                            - source
                            - fromEmail
                            - subject
                            - receivedAt
                          additionalProperties: false
                        actions:
                          type: object
                          properties:
                            canBeDismissed:
                              type: boolean
                            canBeDeleted:
                              type: boolean
                            canBecomeReport:
                              type: boolean
                          required:
                            - canBeDismissed
                            - canBeDeleted
                            - canBecomeReport
                          additionalProperties: false
                        downloadUrl:
                          type: string
                          format: uri
                        latestAnalysis:
                          nullable: true
                          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)$
                            step:
                              type: string
                              enum:
                                - metadata
                                - anomalies
                                - comparison
                            status:
                              type: string
                              enum:
                                - pending
                                - running
                                - succeeded
                                - failed
                                - cancelled
                            error:
                              nullable: true
                              type: string
                              maxLength: 2000
                            startedAt:
                              nullable: true
                              type: string
                              format: date-time
                            finishedAt:
                              nullable: true
                              type: string
                              format: date-time
                            createdAt:
                              type: string
                              format: date-time
                            proposal:
                              nullable: true
                              type: object
                              properties:
                                provider:
                                  nullable: true
                                  type: object
                                  properties:
                                    label:
                                      type: string
                                    confidence:
                                      type: number
                                      minimum: 0
                                      maximum: 1
                                  required:
                                    - label
                                    - confidence
                                  additionalProperties: false
                                unit:
                                  nullable: true
                                  type: object
                                  properties:
                                    label:
                                      type: string
                                    confidence:
                                      type: number
                                      minimum: 0
                                      maximum: 1
                                  required:
                                    - label
                                    - confidence
                                  additionalProperties: false
                              required:
                                - provider
                                - unit
                              additionalProperties: false
                            reportType:
                              nullable: true
                              type: string
                              enum:
                                - pv
                                - rvre
                                - rvrat
                                - cr
                            metadataAnalysisId:
                              nullable: true
                              type: string
                          required:
                            - id
                            - step
                            - status
                            - error
                            - startedAt
                            - finishedAt
                            - createdAt
                            - proposal
                            - reportType
                            - metadataAnalysisId
                          additionalProperties: false
                        senderProvider:
                          nullable: true
                          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)$
                            name:
                              type: string
                              minLength: 1
                              maxLength: 150
                          required:
                            - id
                            - name
                          additionalProperties: false
                        report:
                          nullable: true
                          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)$
                            ref:
                              type: string
                              maxLength: 40
                              pattern: ^[A-Z]+-[1-9]\d*(?:-[A-Z]+-[1-9]\d*)*$
                            name:
                              type: string
                              minLength: 1
                              maxLength: 255
                            unit:
                              nullable: true
                              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)$
                                name:
                                  type: string
                                  minLength: 1
                                  maxLength: 150
                              required:
                                - id
                                - name
                              additionalProperties: false
                          required:
                            - id
                            - ref
                            - name
                            - unit
                          additionalProperties: false
                      required:
                        - id
                        - inboxMailId
                        - organizationId
                        - type
                        - status
                        - file
                        - classifyParked
                        - reportId
                        - processedAt
                        - 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

````