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

# Change Plan

> Switch between Pro and Business plans on an existing subscription.

Replaces the base plan subscription item in Stripe and removes any seat
add-ons (extra_seats resets to 0 — re-add after switching if needed).

Pre-flight checks (409 with structured body):
- ``org_disconnect_required``: target plan allows fewer org connections than
  are currently connected.  Disconnect excess orgs first, then retry.
- ``member_eviction_required``: target plan's included seats are fewer than
  the current member count.  Supply ``member_ids_to_evict`` (exactly the
  overflow count) to proceed atomically.



## OpenAPI

````yaml /openapi.json post /api/v1/workspaces/{workspace_id}/billing/change-plan
openapi: 3.1.0
info:
  description: Change Impact Engine for multi-repo systems
  title: Riftmap
  version: 1.12.3
servers: []
security: []
paths:
  /api/v1/workspaces/{workspace_id}/billing/change-plan:
    post:
      tags:
        - billing
      summary: Change Plan
      description: >-
        Switch between Pro and Business plans on an existing subscription.


        Replaces the base plan subscription item in Stripe and removes any seat

        add-ons (extra_seats resets to 0 — re-add after switching if needed).


        Pre-flight checks (409 with structured body):

        - ``org_disconnect_required``: target plan allows fewer org connections
        than
          are currently connected.  Disconnect excess orgs first, then retry.
        - ``member_eviction_required``: target plan's included seats are fewer
        than
          the current member count.  Supply ``member_ids_to_evict`` (exactly the
          overflow count) to proceed atomically.
      operationId: change_plan_api_v1_workspaces__workspace_id__billing_change_plan_post
      parameters:
        - in: path
          name: workspace_id
          required: true
          schema:
            format: uuid
            title: Workspace Id
            type: string
        - in: header
          name: X-Workspace-Id
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Workspace-Id
        - in: cookie
          name: riftmap_access
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Riftmap Access
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ChangePlanRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ChangePlanResponse'
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - APIKeyHeader: []
        - HTTPBearer: []
components:
  schemas:
    ChangePlanRequest:
      properties:
        member_ids_to_evict:
          anyOf:
            - items:
                format: uuid
                type: string
              type: array
            - type: 'null'
          title: Member Ids To Evict
        plan:
          enum:
            - pro
            - business
          title: Plan
          type: string
        promotion_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Promotion Code
      required:
        - plan
      title: ChangePlanRequest
      type: object
    ChangePlanResponse:
      properties:
        plan:
          title: Plan
          type: string
      required:
        - plan
      title: ChangePlanResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    APIKeyHeader:
      in: header
      name: X-API-Key
      type: apiKey
    HTTPBearer:
      description: API key as Bearer token (rfm_live_... prefix)
      scheme: bearer
      type: http

````