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

# Delete or archive a plan

> Delete a plan. If the plan is not referenced anywhere it is hard deleted and the response is 204. If it is still referenced by checkout links, subscriptions or schedules it is archived instead and the response is 200 with the reference counts.



## OpenAPI

````yaml delete /api/plans/{id}
openapi: 3.1.0
info:
  title: Fynn V2 Plans API
  version: 2026-06
  description: >-
    REST API for the Fynn V2 Plans. Use it to define plans with upgrade and
    downgrade tiers, sell them through checkout links, and let customers switch
    tiers from your customer portal. All amounts use the minor or decimal
    representation documented per field. Authenticate setup endpoints with an
    API token and customer endpoints with a customer token.
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - ApiToken: []
tags:
  - name: Plans
    description: Create and manage plans, tiers and items.
  - name: Checkout Links
    description: Sell a plan tier through a hosted checkout link.
  - name: Plan switching (customer)
    description: Customer facing upgrade and downgrade between tiers.
paths:
  /api/plans/{id}:
    delete:
      tags:
        - Plans
      summary: Delete or archive a plan
      description: >-
        Delete a plan. If the plan is not referenced anywhere it is hard deleted
        and the response is 204. If it is still referenced by checkout links,
        subscriptions or schedules it is archived instead and the response is
        200 with the reference counts.
      operationId: deletePlan
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            example: 1280792f-4e23-793d-8e9c-3a1bf36630bd
          description: The plan UUID.
      responses:
        '200':
          description: The plan was archived because it is still referenced.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PlanArchivedResult'
        '204':
          description: The plan was hard deleted.
        '401':
          description: Authentication is missing or the token is invalid.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '403':
          description: The token is valid but lacks the required permission.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
        '404':
          description: The requested resource does not exist for this Organisation.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemError'
components:
  schemas:
    PlanArchivedResult:
      type: object
      description: >-
        Returned with status 200 when a plan could not be hard deleted because
        it is still referenced, and was archived instead.
      properties:
        status:
          type: string
          enum:
            - archived
        references:
          type: object
          properties:
            checkoutLinks:
              type: integer
            subscriptions:
              type: integer
            schedules:
              type: integer
    ProblemError:
      type: object
      description: >-
        Problem detail error body (application/problem+json). Additional members
        may be present depending on the error.
      properties:
        status:
          type: integer
          example: 404
        type:
          type: string
          description: Stable machine readable error key.
          example: PLAN__NOT_FOUND
        title:
          type: string
          example: An error occurred
        detail:
          type: string
          example: Plan not found.
      required:
        - status
        - type
        - title
        - detail
  securitySchemes:
    ApiToken:
      type: http
      scheme: bearer
      description: >-
        Organisation API token. Send it as Authorization: Bearer api_... The
        token is scoped to a single Organisation.

````