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

# Delete a preview deployment

> Stops and removes the preview for the given deployment id (format: {projectSlug}-{prNumber}, e.g. myorg-myapp-12).



## OpenAPI

````yaml openapi.json delete /api/previews/{deploymentId}
openapi: 3.0.3
info:
  title: Prvue Orchestrator API
  version: 0.1.0
  description: >-
    API for the preview deployer orchestrator: health checks, GitHub webhook,
    and preview lifecycle (list/delete).
servers:
  - url: http://localhost:3000
    description: Orchestrator API (on server; default ORCHESTRATOR_PORT)
security: []
paths:
  /api/previews/{deploymentId}:
    delete:
      tags:
        - Previews
      summary: Delete a preview deployment
      description: >-
        Stops and removes the preview for the given deployment id (format:
        {projectSlug}-{prNumber}, e.g. myorg-myapp-12).
      operationId: deletePreview
      parameters:
        - name: deploymentId
          in: path
          required: true
          description: Deployment id (projectSlug-prNumber)
          schema:
            type: string
            example: myorg-myapp-12
      responses:
        '200':
          description: Preview cleaned up
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  message:
                    type: string
        '400':
          description: Invalid deployment id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Deployment not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Cleanup failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error message

````