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

# Ingest Conversation

> Ingest a multi-turn conversation. The conversation is stored as a single source and segmented at ingestion into windows of 4 turns; each window is extracted independently with the prior window as lookback context for pronoun resolution.



## OpenAPI

````yaml https://api.crosmos.dev/openapi.json post /api/v1/conversations
openapi: 3.1.0
info:
  title: Crosmos API
  version: 0.1.0
servers:
  - url: /
security: []
paths:
  /api/v1/conversations:
    post:
      tags:
        - conversations
      summary: Ingest Conversation
      description: >-
        Ingest a multi-turn conversation. The conversation is stored as a single
        source and segmented at ingestion into windows of 4 turns; each window
        is extracted independently with the prior window as lookback context for
        pronoun resolution.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/IngestConversationRequest'
      responses:
        '202':
          description: Accepted — job enqueued
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IngestConversationResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationErrorBody'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationErrorBody'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationErrorBody'
        '429':
          description: Rate limited / quota / pending cap
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/RateLimitedBody'
                  - $ref: '#/components/schemas/QuotaExceededBody'
                  - $ref: '#/components/schemas/ConversationErrorBody'
        '503':
          description: Queue full
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConversationErrorBody'
      security:
        - bearerAuth: []
components:
  schemas:
    IngestConversationRequest:
      type: object
      properties:
        space_id:
          type: string
          format: uuid
        messages:
          type: array
          items:
            $ref: '#/components/schemas/ConversationMessage'
          minItems: 1
          maxItems: 500
        session_id:
          type: string
          minLength: 1
          maxLength: 255
        session_date:
          type: string
          minLength: 1
        visibility:
          $ref: '#/components/schemas/MemoryVisibility'
        meta:
          type: object
          nullable: true
          additionalProperties:
            nullable: true
      required:
        - space_id
        - messages
    IngestConversationResponse:
      type: object
      properties:
        job_id:
          type: string
          format: uuid
        status:
          type: string
          enum:
            - pending
        source_id:
          type: string
          format: uuid
      required:
        - job_id
        - status
        - source_id
    ConversationErrorBody:
      type: object
      properties:
        detail:
          type: string
      required:
        - detail
    RateLimitedBody:
      type: object
      properties:
        detail:
          type: object
          properties:
            error:
              type: string
              enum:
                - rate_limited
            scope:
              type: string
              enum:
                - rpm
                - day
            limit:
              type: integer
            count:
              type: integer
          required:
            - error
            - scope
            - limit
            - count
      required:
        - detail
    QuotaExceededBody:
      type: object
      properties:
        detail:
          type: object
          properties:
            error:
              type: string
              enum:
                - quota_exceeded
            key:
              type: string
            limit:
              type: integer
            used:
              type: integer
          required:
            - error
            - key
            - limit
            - used
      required:
        - detail
    ConversationMessage:
      type: object
      properties:
        role:
          type: string
          minLength: 1
          maxLength: 50
        content:
          type: string
          minLength: 1
          maxLength: 100000
      required:
        - role
        - content
    MemoryVisibility:
      type: string
      enum:
        - private
        - org
      default: private
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT access token or API key (csk_...)

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.