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

# Ingest a document

> Ingests a text document into the workspace, optionally into a named collection.
The document is chunked and indexed on the way in, and the ingest is metered per
chunk.



## OpenAPI

````yaml /api-reference/openapi.json post /recall/documents
openapi: 3.1.0
info:
  title: Akumi
  version: 0.0.1
servers:
  - url: https://api.akumi.eu/v1
    description: Production
security:
  - http: []
tags:
  - name: Audit log
  - name: Chat completions
  - name: Embeddings
  - name: Models
  - name: Recall
  - name: Scores
paths:
  /recall/documents:
    post:
      tags:
        - Recall
      summary: Ingest a document
      description: >-
        Ingests a text document into the workspace, optionally into a named
        collection.

        The document is chunked and indexed on the way in, and the ingest is
        metered per

        chunk.
      operationId: v1.recall.documents.store
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestDocumentRequest'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                      title:
                        type: string
                      status:
                        type: string
                      chunk_count:
                        type:
                          - integer
                          - 'null'
                      token_count:
                        type:
                          - integer
                          - 'null'
                    required:
                      - id
                      - title
                      - status
                      - chunk_count
                      - token_count
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    IngestDocumentRequest:
      type: object
      description: >-
        Validates a POST /v1/recall/documents text-ingest body. A document
        belongs to

        exactly one collection, so `collection` is required.
      properties:
        title:
          type: string
          maxLength: 255
        text:
          type: string
          maxLength: 100000
        source:
          type:
            - string
            - 'null'
          maxLength: 255
        collection:
          type: string
          maxLength: 255
      required:
        - title
        - text
        - collection
      title: IngestDocumentRequest
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    http:
      type: http
      scheme: bearer

````