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

# Upload a file into a pod

> Upload the request body as a file in the pod. `filePath` is the path inside the pod,
including subfolders (`reports/q3.txt`). The body is the raw file bytes. `Content-Type`
is the file type (parameters such as charset are ignored) and `Content-Length` is required.
The API key must be allowed to write the pod.

The path is checked with the same normalization as other file paths. A path that leaves
the pod is rejected and nothing is written.




## OpenAPI

````yaml https://dust.tt/api/doc post /api/v1/w/{wId}/pods/{podId}/files/{filePath}
openapi: 3.0.0
info:
  title: DUST API Documentation
  version: 1.0.2
  description: The OpenAPI specification for the Dust.tt API
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://dust.tt
    description: Dust.tt API (us-central1)
  - url: https://eu.dust.tt
    description: Dust.tt API (europe-west1)
security: []
tags:
  - name: Users
    description: User management
  - name: Agents
    description: Agent configurations
  - name: Analytics
    description: Workspace analytics
  - name: Apps
    description: Dust apps
  - name: Conversations
    description: Conversations
  - name: Datasources
    description: Data sources
  - name: DatasourceViews
    description: Data source views
  - name: Feedbacks
    description: Message feedbacks
  - name: MCP
    description: MCP servers
  - name: Mentions
    description: Mentions
  - name: Search
    description: Search
  - name: Skills
    description: Skills
  - name: Spaces
    description: Spaces
  - name: Tools
    description: Tools
  - name: Triggers
    description: Triggers
  - name: Workspace
    description: Workspace
  - name: Private Agents
    description: Private API - Agent configurations
  - name: Private Authentication
    description: Private API - Authentication (WorkOS)
  - name: Private Conversations
    description: Private API - Conversations
  - name: Private Events
    description: Private API - SSE event streams
  - name: Private Extension
    description: Private API - Extension configuration
  - name: Private Files
    description: Private API - File uploads
  - name: Private Mentions
    description: Private API - Mention suggestions
  - name: Private Messages
    description: Private API - Messages
  - name: Private Spaces
    description: Private API - Spaces and data source views
  - name: Private User
    description: Private API - User
  - name: Private Workspace
    description: Private API - Workspace settings
paths:
  /api/v1/w/{wId}/pods/{podId}/files/{filePath}:
    post:
      tags:
        - Spaces
      summary: Upload a file into a pod
      description: >
        Upload the request body as a file in the pod. `filePath` is the path
        inside the pod,

        including subfolders (`reports/q3.txt`). The body is the raw file bytes.
        `Content-Type`

        is the file type (parameters such as charset are ignored) and
        `Content-Length` is required.

        The API key must be allowed to write the pod.


        The path is checked with the same normalization as other file paths. A
        path that leaves

        the pod is rejected and nothing is written.
      parameters:
        - in: path
          name: wId
          required: true
          description: ID of the workspace
          schema:
            type: string
        - name: podId
          in: path
          required: true
          description: ID of the pod
          schema:
            type: string
        - name: filePath
          in: path
          required: true
          description: >
            Relative path inside the pod. Slashes are subfolders
            (`reports/q3.txt`).
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        '200':
          description: The file was written into the pod.
          content:
            application/json:
              schema:
                type: object
                required:
                  - file
                properties:
                  file:
                    type: object
                    required:
                      - sId
                      - fileName
                      - path
                      - contentType
                      - status
                    properties:
                      sId:
                        type: string
                      fileName:
                        type: string
                        description: The file's name, without its folders.
                      path:
                        type: string
                        description: Scoped path inside the pod, including subfolders.
                      contentType:
                        type: string
                      status:
                        type: string
        '400':
          description: The path, content type, or content length is not accepted.
        '401':
          description: Unauthorized
        '404':
          description: The pod does not exist or the key cannot write it.
        '429':
          description: Rate limit exceeded
      security:
        - BearerAuth: []
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Your DUST API key is a Bearer token.

````

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