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

# Update File Content

> Update the text content of an existing file



## OpenAPI

````yaml PATCH /agent/file/{file_id}
openapi: 3.1.0
info:
  title: Outbox AI API
  description: API for managing AI agents (chatbots and voicebots) on the Outbox platform
  version: 1.0.0
servers:
  - url: https://api.getoutbox.ai
security: []
paths:
  /agent/file/{file_id}:
    patch:
      summary: Update File Content
      description: Update the text content of an existing file
      parameters:
        - name: file_id
          in: path
          description: The ID of the file to update
          required: true
          schema:
            type: string
      requestBody:
        description: New file content
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileUpdate'
      responses:
        '200':
          description: File updated successfully
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - Insufficient permissions (requires level 2)
        '404':
          description: File not found
      security:
        - CompanyApiKey: []
components:
  schemas:
    FileUpdate:
      type: object
      required:
        - text
      properties:
        text:
          type: string
          description: New text content for the file
  securitySchemes:
    CompanyApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Company API Key

````