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

# Upload File

> Upload a file to an agent (file upload, text content, or web scraping)



## OpenAPI

````yaml POST /agent/file
openapi: 3.1.0
info:
  title: Aidan API
  description: API for managing AI agents (chatbots and voicebots) on the Outbox platform
  version: 1.0.0
servers:
  - url: https://api.callaidan.com
security: []
tags:
  - name: Webhooks
    description: >-
      **Inbound notifications.** After a voice call ends, Aidan POSTs JSON to
      the Webhook URL on your agent (Voice Agents settings or `webhook_url`).
      Your server receives these requests — they are not calls *to*
      `api.callaidan.com`. The documented path `/_reference/webhooks/...` exists
      only in this spec so the payload schema can appear in the API Reference;
      it is not callable on the production API.
paths:
  /agent/file:
    post:
      summary: Upload File
      description: Upload a file to an agent (file upload, text content, or web scraping)
      requestBody:
        description: >-
          File upload options - text content, file upload, or URLs for web
          scraping
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FileUpload'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileUploadMultipart'
      responses:
        '201':
          description: File uploaded successfully
        '400':
          description: Bad Request - Invalid file or missing required fields
        '401':
          description: Unauthorized - Invalid or missing API key
        '403':
          description: Forbidden - Insufficient permissions (requires level 2)
      security:
        - CompanyApiKey: []
components:
  schemas:
    FileUpload:
      type: object
      required:
        - agent_id
      properties:
        agent_id:
          type: string
          description: ID of the agent
        text:
          type: string
          description: Text content (for text upload option)
        name:
          type: string
          description: Name of the file (required when using text option)
        urls:
          type: string
          description: Newline-separated URLs for web scraping (for web scraping option)
    FileUploadMultipart:
      type: object
      required:
        - agent_id
        - file
      properties:
        agent_id:
          type: string
          description: ID of the agent
        file:
          type: string
          format: binary
          description: File to upload
  securitySchemes:
    CompanyApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: Company API Key

````