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

# Stage a chat attachment

> Stages a file dropped into the Assistant chat. The bytes are cached server-side (tenant-scoped, TTL'd) and only the returned handle plus a small content sample travel through the chat; the platform substitutes the real bytes when the agent calls a file tool with the `attachmentId`. Limit 25 MB per file.



## OpenAPI

````yaml /openapi.yaml post /api/v1/assistant/attachment
openapi: 3.0.3
info:
  title: Datris API
  description: >
    REST API for the Datris AI Data Platform. Ingest, validate, transform,
    store, and retrieve data.


    For AI agent integration, use the [MCP
    Server](https://docs.datris.ai/mcp-server) instead.
  version: 1.11.3
  contact:
    name: Datris
    url: https://datris.ai
  license:
    name: Apache 2.0
servers:
  - url: http://localhost:8080
    description: Local development
security:
  - ApiKeyAuth: []
paths:
  /api/v1/assistant/attachment:
    post:
      tags:
        - Assistant
      summary: Stage a chat attachment
      description: >-
        Stages a file dropped into the Assistant chat. The bytes are cached
        server-side (tenant-scoped, TTL'd) and only the returned handle plus a
        small content sample travel through the chat; the platform substitutes
        the real bytes when the agent calls a file tool with the `attachmentId`.
        Limit 25 MB per file.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
      responses:
        '200':
          description: Staged attachment descriptor
          content:
            application/json:
              schema:
                type: object
                properties:
                  attachmentId:
                    type: string
                  filename:
                    type: string
                  detectedType:
                    type: string
                    description: >-
                      Detected source category (e.g. "CSV (structured)",
                      "document (unstructured)")
                  byteSize:
                    type: integer
                  sample:
                    type: string
                    description: >-
                      Text sample for the model (capped; binary documents get a
                      one-line note)
        '400':
          description: Empty file
        '413':
          description: File exceeds the 25 MB limit
        '500':
          description: Error
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Optional API key for authentication (enabled via application.yaml)

````