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

# Upload direct deployment file content

> Streams one registered file through InsForge to the provider. The request body must match the manifest size and SHA-1 digest.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/deployments.yaml put /api/deployments/{id}/files/{fileId}/content
openapi: 3.0.3
info:
  title: Insforge Deployments API
  version: 1.0.0
  description: >-
    Frontend deployment sessions, source uploads, environment variables, and
    custom domains.
servers: []
security: []
paths:
  /api/deployments/{id}/files/{fileId}/content:
    put:
      tags:
        - Admin
      summary: Upload direct deployment file content
      description: >-
        Streams one registered file through InsForge to the provider. The
        request body must match the manifest size and SHA-1 digest.
      parameters:
        - $ref: '#/components/parameters/DeploymentId'
        - $ref: '#/components/parameters/FileId'
      requestBody:
        required: true
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        '200':
          description: File uploaded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentManifestFileUploaded'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          description: Unauthorized
        '403':
          description: Admin access required
        '404':
          $ref: '#/components/responses/Error'
        '415':
          description: File content must be uploaded as application/octet-stream
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/Error'
        '500':
          $ref: '#/components/responses/Error'
      security:
        - bearerAuth: []
        - apiKey: []
components:
  parameters:
    DeploymentId:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Deployment run ID.
    FileId:
      name: fileId
      in: path
      required: true
      schema:
        type: string
        format: uuid
      description: Direct upload file ID returned by `POST /api/deployments/direct`.
  schemas:
    DeploymentManifestFileUploaded:
      allOf:
        - $ref: '#/components/schemas/DeploymentManifestFileEntry'
        - type: object
          required:
            - fileId
            - uploadedAt
          properties:
            fileId:
              type: string
              format: uuid
            uploadedAt:
              type: string
              format: date-time
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
          description: Error code for programmatic handling.
        message:
          type: string
          description: Human-readable error message.
        statusCode:
          type: integer
        nextActions:
          type: string
          description: Suggested action to resolve the error.
    DeploymentManifestFileEntry:
      type: object
      required:
        - path
        - sha
        - size
      properties:
        path:
          type: string
          minLength: 1
          maxLength: 2048
          description: Relative source path using forward slashes.
          example: src/App.tsx
        sha:
          type: string
          pattern: ^[a-fA-F0-9]{40}$
          description: SHA-1 hex digest of the file content.
        size:
          type: integer
          minimum: 0
          description: File size in bytes.
  responses:
    Error:
      description: Error response
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Project admin JWT or an API key passed as a Bearer token.
    apiKey:
      type: apiKey
      in: header
      name: x-api-key

````