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

# Discard draft plan

> Permanently deletes the latest draft (non-published) version of the plan. The previously published version remains untouched. Returns 400 if the latest version is already published.



## OpenAPI

````yaml /api-reference/openapi.json delete /catalog/plans/{identifier}/discard/
openapi: 3.0.0
info:
  title: kelviq API
  version: 1.0.0
  description: >-
    API for interacting with kelviq services, derived from Python SDK
    documentation.
servers:
  - url: https://api.kelviq.com/api/v1
    description: kelviq API Server (General - specific operations might override)
security:
  - bearerAuth: []
tags:
  - name: Products
    description: Catalog products.
  - name: Product Settings
    description: Per-product settings (currency, VPN/Tor/proxy, product URL).
  - name: Product Files
    description: Product images and downloadable assets.
  - name: Features
    description: Catalog features that can be granted as plan entitlements.
  - name: Plans
    description: Catalog plans (CRUD, publish, versions, prices).
  - name: Plan Entitlements
    description: Feature entitlements attached to a plan.
  - name: Plan Files
    description: Files attached to plans, and signed download links.
  - name: Media
    description: Generate presigned S3 upload URLs for product/plan images and files.
  - name: Partner
    description: Partner integration APIs (organization provisioning, lookup).
  - name: Charges
    description: >-
      One-time payments charged immediately against a customer's default payment
      method.
paths:
  /catalog/plans/{identifier}/discard/:
    parameters:
      - name: identifier
        in: path
        required: true
        description: Plan identifier.
        example: pro-monthly
        schema:
          type: string
    delete:
      tags:
        - Plans
      summary: Discard draft plan
      description: >-
        Permanently deletes the latest draft (non-published) version of the
        plan. The previously published version remains untouched. Returns 400 if
        the latest version is already published.
      operationId: discardCatalogPlanDraft
      responses:
        '204':
          description: Draft discarded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageResponse'
              example:
                message: Plan discarded successfully.
        '400':
          description: Plan is already published; cannot be discarded.
        '401':
          description: Unauthorized — missing or invalid API key
      security:
        - bearerAuth: []
components:
  schemas:
    MessageResponse:
      type: object
      properties:
        message:
          type: string
          example: Object deleted successfully.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        The Server API Key obtained from the kelviq application. Pass as a
        Bearer token in the Authorization header. Example: 'Authorization:
        Bearer __YOUR_API_KEY__'

````