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

# Create File

> Create a file. Content may be plain text or base64 (auto-detected)

Create a team-scoped file. `content` can be plain text or base64 (auto-detected). `name` must be unique per team and end with `.csv`, `.json`, or `.txt`.


## OpenAPI

````yaml POST /files
openapi: 3.1.0
info:
  title: LoadForge API
  description: >-
    The LoadForge API provides programmatic access to create, manage, and run
    load tests on your web applications
  license:
    name: MIT
  version: 2.0.0
servers:
  - url: https://app.loadforge.com/api/v2
security:
  - bearerAuth: []
paths:
  /files:
    post:
      description: Create a file. Content may be plain text or base64 (auto-detected)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - content
              properties:
                name:
                  type: string
                  description: >-
                    Filename ending with .csv, .json, or .txt. Must be unique
                    per team.
                content:
                  type: string
                  description: >-
                    Plain text or base64-encoded file content. Base64 is
                    auto-detected.
            example:
              name: data.csv
              content: |-
                a,b,c
                1,2,3
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  file_id:
                    type: integer
              example:
                file_id: 123
        '400':
          description: Validation or duplicate name error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Insufficient scope
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: string
components:
  schemas:
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````