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

# Upload document to memory

> Upload a PDF document. The server extracts plain text and save the content for future comparison



## OpenAPI

````yaml https://app.recallio.ai/swagger/v1/swagger.json post /api/Knowledge/document
openapi: 3.0.4
info:
  title: Recallio API
  description: API for Recallio.AI
  contact:
    name: Recallio.AI Team
    email: support@recallio.ai
  version: v1
servers:
  - url: https://app.recallio.ai
security:
  - Bearer: []
tags:
  - name: Knowledge
  - name: Memory
  - name: MemoryGraph (Extra Pack)
paths:
  /api/Knowledge/document:
    post:
      tags:
        - Knowledge
      summary: Upload document to memory
      description: >-
        Upload a PDF document. The server extracts plain text and save the
        content for future comparison
      operationId: UploadDocument
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - ProjectId
              type: object
              properties:
                File:
                  type: string
                  format: binary
                ProjectId:
                  type: string
                SourceUrl:
                  type: string
                SourceType:
                  type: string
                Tags:
                  type: array
                  items:
                    type: string
                ConsentFlag:
                  type: boolean
            encoding:
              File:
                style: form
              ProjectId:
                style: form
              SourceUrl:
                style: form
              SourceType:
                style: form
              Tags:
                style: form
              ConsentFlag:
                style: form
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReturnClass'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorReturnClass'
components:
  schemas:
    ErrorReturnClass:
      required:
        - error
      type: object
      properties:
        error:
          minLength: 1
          type: string
          description: Error message indicating the specific validation issue
          example: '"Invalid scope type. Must be ''user'', ''project'', or ''team''."'
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        JWT Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````