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

# Upload storage file



## OpenAPI

````yaml https://api.specular.dev/openapi.json put /branches/{branchId}/storage/upload
openapi: 3.0.0
info:
  title: Specular API
  description: Backend-as-a-Service API for managing projects and branches
  version: 1.0.0
servers:
  - url: https://api.specular.dev
    description: Production server
  - url: http://localhost:3000
    description: Development server
security:
  - bearerAuth: []
paths:
  /branches/{branchId}/storage/upload:
    put:
      tags:
        - Storage
      summary: Upload storage file
      parameters:
        - schema:
            type: string
          in: query
          name: key
          required: true
          description: File key/path to upload
        - schema:
            type: string
          in: path
          name: branchId
          required: true
      responses:
        '200':
          description: File uploaded
          content:
            application/json:
              schema:
                description: File uploaded
                type: object
                properties:
                  success:
                    type: boolean
                  key:
                    type: string
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '413':
          description: File too large
          content:
            application/json:
              schema:
                description: File too large
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Bearer authentication with API key (format: Bearer sk_xxx)'

````