> ## 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.

# Presign an import of PDFs straight into the processing queue

> Second door of the queue, next to mail reception: one provenance mail with `source: import` plus one item per PDF, each already typed `report`. Only descriptors travel - the browser PUTs each file to its presigned URL, then calls the confirm route, which is what queues the metadata analysis. PDF only, on the declared type.



## OpenAPI

````yaml /api/rs/openapi.json post /rs/inbox-mails/v1/import
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/import:
    post:
      tags:
        - inbox-mails
      summary: Presign an import of PDFs straight into the processing queue
      description: >-
        Second door of the queue, next to mail reception: one provenance mail
        with `source: import` plus one item per PDF, each already typed
        `report`. Only descriptors travel - the browser PUTs each file to its
        presigned URL, then calls the confirm route, which is what queues the
        metadata analysis. PDF only, on the declared type.
      operationId: importInboxDocumentsRSV1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                files:
                  maxItems: 20
                  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
                    required:
                      - name
                      - mimeType
                      - size
              required:
                - files
      responses:
        '201':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  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)$
                  files:
                    type: array
                    items:
                      type: object
                      properties:
                        itemId:
                          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: 255
                        storageKey:
                          type: string
                        presignedUrl:
                          type: string
                          format: uri
                        expiresAt:
                          type: string
                          format: date-time
                      required:
                        - itemId
                        - name
                        - storageKey
                        - presignedUrl
                        - expiresAt
                      additionalProperties: false
                required:
                  - inboxMailId
                  - files
                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

````