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

# Update InsForge-hosted slug

> Updates the Cloud project slug used for the `.insforge.site` domain. Pass `null` to clear the slug.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/deployments.yaml put /api/deployments/slug
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/slug:
    put:
      tags:
        - Admin
      summary: Update InsForge-hosted slug
      description: >-
        Updates the Cloud project slug used for the `.insforge.site` domain.
        Pass `null` to clear the slug.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSlugRequest'
      responses:
        '200':
          description: Slug updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateSlugResponse'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          description: Unauthorized
        '403':
          description: Admin access required
        '409':
          description: Slug is already taken
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          $ref: '#/components/responses/Error'
      security:
        - bearerAuth: []
        - apiKey: []
components:
  schemas:
    UpdateSlugRequest:
      type: object
      required:
        - slug
      properties:
        slug:
          type: string
          nullable: true
          minLength: 3
          maxLength: 63
          pattern: ^[a-z0-9]([a-z0-9-]*[a-z0-9])?$
    UpdateSlugResponse:
      type: object
      required:
        - success
        - slug
        - domain
      properties:
        success:
          type: boolean
        slug:
          type: string
          nullable: true
        domain:
          type: string
          nullable: true
    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

````