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

# Cancel Website Generation

> Cancel an in-progress website generation for the specified project ID.

This endpoint:
1. Finds any in-progress generations for the project
2. Updates their status to FAILED with a cancellation message
3. Returns details about the cancelled generation

Args:
    project_id: The project ID of the generation to cancel
    
Returns:
    Details of the cancelled generation



## OpenAPI

````yaml openapi.json post /codenull/ai/api/v1/cancel-website/{project_id}
openapi: 3.1.0
info:
  title: codenull-ai-backend
  version: 0.1.0
servers: []
security: []
paths:
  /codenull/ai/api/v1/cancel-website/{project_id}:
    post:
      tags:
        - generate-website-post
      summary: Cancel Website Generation
      description: |-
        Cancel an in-progress website generation for the specified project ID.

        This endpoint:
        1. Finds any in-progress generations for the project
        2. Updates their status to FAILED with a cancellation message
        3. Returns details about the cancelled generation

        Args:
            project_id: The project ID of the generation to cancel
            
        Returns:
            Details of the cancelled generation
      operationId: api-cancel_website_generation
      parameters:
        - name: project_id
          in: path
          required: true
          schema:
            type: string
            title: Project Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CancelWebsiteResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    CancelWebsiteResponse:
      properties:
        generation_id:
          type: string
          title: Generation Id
          description: Generation ID of the cancelled generation
        project_id:
          type: string
          title: Project Id
          description: Project ID as UUID
        status:
          $ref: '#/components/schemas/GenerationStatus'
          description: Updated status (should be FAILED)
        previous_status:
          $ref: '#/components/schemas/GenerationStatus'
          description: Status before cancellation
        message:
          type: string
          title: Message
          description: Cancellation message
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: Timestamp when the generation was cancelled
      type: object
      required:
        - generation_id
        - project_id
        - status
        - previous_status
        - message
        - updated_at
      title: CancelWebsiteResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GenerationStatus:
      type: string
      enum:
        - PENDING
        - GENERATING_PLAN
        - GENERATING_WEBSITE
        - COMPLETED
        - FAILED
      title: GenerationStatus
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````