---
title: "Change the plan on an existing subscription (upgrade or downgrade)"
method: POST
path: "/api/workspaces/{workspaceId}/billing/change-plan"
tags: ["Billing"]
---

# Change the plan on an existing subscription (upgrade or downgrade)

`POST /api/workspaces/{workspaceId}/billing/change-plan`

## Request

- Base URL: `https://hiveship.app/api`
- URL: `https://hiveship.app/api/api/workspaces/{workspaceId}/billing/change-plan`
- Auth: API key in cookie `hiveship_access`

Swaps the Stripe price on the live subscription. An upgrade is prorated and invoiced immediately; a downgrade credits the unused remainder against the next invoice. A trial keeps its original end date. Dropping to Free is a cancellation and stays in the billing portal.

## Path parameters

- `workspaceId` string, required

## Response `200`

Plan changed

## Other responses

- `400`: No live subscription, same plan, or card declined

---

[API](https://skmtc.dev/hiveship/apis/hiveship-api.md) · [All operations](https://skmtc.dev/hiveship/apis/hiveship-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hiveship/apis/hiveship-api/revisions/73d3e26544e4?raw)
