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

# Upload Files

> Upload file to Trata account to use in AI Agents



## OpenAPI

````yaml openapi.json post /v1/files
openapi: 3.1.0
info:
  title: Trata AI API
  description: >-
    Human like conversation to answer calls, drive engagement, automate
    follow-ups & schedule bookings 24/7  with end to end integrations ensuring
    you never miss a sales enquiry.
  version: 1.0.0
servers:
  - url: https://api.trata.ai
    description: Production
  - url: http://localhost:8000
    description: Development
security: []
paths:
  /v1/files:
    post:
      tags:
        - Files
      summary: Upload Files
      description: Upload file to Trata account to use in AI Agents
      operationId: uploadFileV1
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/Body_uploadFileV1'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Files'
                title: Response Uploadfilev1
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    Body_uploadFileV1:
      properties:
        files:
          items:
            type: string
            format: binary
          type: array
          title: Files
      type: object
      required:
        - files
      title: Body_uploadFileV1
    Files:
      properties:
        id:
          type: string
          title: Id
        orgId:
          type: string
          title: Orgid
        fileName:
          type: string
          title: Filename
        fileUrl:
          type: string
          title: Fileurl
        createdBy:
          type: string
          title: Createdby
        createdAt:
          type: string
          format: date-time
          title: Createdat
        updatedBy:
          type: string
          title: Updatedby
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
      type: object
      title: Files
      description: Stores the map of file id with respective file URL in storage manager
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````