> ## 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.

# Create legacy deployment session (deprecated)

> Creates a `WAITING` deployment run and returns presigned form data for the legacy source-zip upload flow. New tooling should use `/api/deployments/direct`.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/deployments.yaml post /api/deployments
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:
    post:
      tags:
        - Admin
      summary: Create legacy deployment session (deprecated)
      description: >-
        Creates a `WAITING` deployment run and returns presigned form data for
        the legacy source-zip upload flow. New tooling should use
        `/api/deployments/direct`.
      responses:
        '201':
          description: Legacy deployment session created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateDeploymentResponse'
        '401':
          description: Unauthorized
        '403':
          description: Admin access required
        '500':
          $ref: '#/components/responses/Error'
        '503':
          description: Deployment provider or legacy S3 staging is not configured
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      deprecated: true
      security:
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    CreateDeploymentResponse:
      type: object
      required:
        - id
        - uploadUrl
        - uploadFields
      properties:
        id:
          type: string
          format: uuid
        uploadUrl:
          type: string
          format: uri
        uploadFields:
          type: object
          additionalProperties:
            type: string
    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.
  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

````