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

# Publish a plan

> Promotes the most recent draft version of the plan to `isLatest=true`, demotes the previous published version, and syncs the plan to Stripe / internal billing. Optionally migrates existing customers' features or pricing. Fails with 400 if no price exists or required currencies are missing.



## OpenAPI

````yaml /api-reference/openapi.json post /catalog/plans/{identifier}/publish/
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}/publish/:
    parameters:
      - name: identifier
        in: path
        required: true
        description: Plan identifier.
        example: pro-monthly
        schema:
          type: string
    post:
      tags:
        - Plans
      summary: Publish a plan
      description: >-
        Promotes the most recent draft version of the plan to `isLatest=true`,
        demotes the previous published version, and syncs the plan to Stripe /
        internal billing. Optionally migrates existing customers' features or
        pricing. Fails with 400 if no price exists or required currencies are
        missing.
      operationId: publishCatalogPlan
      requestBody:
        required: false
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PlanPublishRequest'
      responses:
        '200':
          description: Plan published.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanPublishResponse'
              example:
                status: published
        '400':
          description: No price exists, missing currency coverage, or already published.
        '401':
          description: Unauthorized — missing or invalid API key
        '428':
          description: Billing provider not authenticated.
      security:
        - bearerAuth: []
components:
  schemas:
    PlanPublishRequest:
      type: object
      description: Publishes the most recent draft of a plan.
      properties:
        updateFeatures:
          type: boolean
          description: >-
            If `true`, existing customers are migrated so their feature
            entitlements match the newly published plan.
          example: false
        updatePricing:
          type: boolean
          description: >-
            If `true`, existing customers are migrated to the newly published
            plan's pricing.
          example: false
    PlanPublishResponse:
      type: object
      properties:
        status:
          type: string
          example: published
  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__'

````