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

# Create File

> Create a new file in a workspace



## OpenAPI

````yaml /api-reference/openapi.json post /v1/bot/workspace/file
openapi: 3.0.0
info:
  title: BoostGPT API
  version: 1.0.0
  description: API for managing AI agents with memory capabilities
servers:
  - url: https://api.boostgpt.co
    description: Production server
security:
  - BearerAuth: []
tags:
  - name: Agent
    description: Operations for managing AI agents
  - name: Memory
    description: Operations for managing agent memory sources
  - name: Chat
    description: Operations for chatting with agents and managing conversations
  - name: Subscribers
    description: Operations for managing subscribers and leads
  - name: Tools
    description: Operations for managing agent tools and MCP server integrations
  - name: Analytics
    description: Operations for retrieving agent statistics and analytics
  - name: Heartbeat
    description: Operations for managing autonomous agent scheduling and execution
  - name: User Memory
    description: Operations for managing per-user memory entries
  - name: Email
    description: Operations for managing agent email functionality
  - name: Triggers
    description: Operations for firing proactive agent trigger events
  - name: CRM
    description: >-
      Operations for managing agent CRM contacts, pipelines, deals, follow-ups,
      and reports
  - name: Workflows
    description: Operations for managing agent workflow automations
  - name: Calendar
    description: Operations for managing agent calendar settings, availability, and events
  - name: Workspace
    description: Operations for managing agent workspaces and files
paths:
  /v1/bot/workspace/file:
    post:
      tags:
        - Workspace
      summary: Create File
      description: Create a new file in a workspace
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateFileRequest'
      responses:
        '201':
          description: File created
          content:
            application/json:
              schema:
                type: object
                properties:
                  file:
                    $ref: '#/components/schemas/WorkspaceFileObject'
        '403':
          description: File limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Workspace not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateFileRequest:
      type: object
      required:
        - project_id
        - bot_id
        - workspace_uuid
        - file_path
      properties:
        project_id:
          type: string
          description: Project ID
        bot_id:
          type: string
          description: Agent ID
        workspace_uuid:
          type: string
          description: Workspace UUID
        file_path:
          type: string
          description: Virtual file path (e.g., /src/app.js)
        content:
          type: string
          description: File content
        language:
          type: string
          description: Programming language
    WorkspaceFileObject:
      type: object
      properties:
        uuid:
          type: string
        file_path:
          type: string
          description: Virtual file path (e.g., /src/app.js)
        language:
          type: string
          description: Programming language
        content:
          type: string
          description: File content (included in read responses)
        version:
          type: integer
          description: File version number
        size_bytes:
          type: integer
          nullable: true
        last_edited_by:
          type: string
          enum:
            - agent
            - user
        created_at:
          type: string
        updated_at:
          type: string
    Error:
      type: object
      properties:
        error:
          type: string
          description: Error message
        code:
          type: string
          description: Error code
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: Enter your API key

````