---
title: "Move the team to another plan"
method: POST
path: "/api/v1/billing/plan"
tags: ["Billing"]
---

# Move the team to another plan

`POST /api/v1/billing/plan`

## Request

- Base URL: `http://localhost:5180`
- URL: `http://localhost:5180/api/v1/billing/plan`
- Auth: API key in cookie `better-auth.session_token`

Swaps the price on the plan item of the team’s live subscription and sets its quantity to the portfolio’s unit count, from today. The rest of the month on the old plan is credited on the next invoice. The bank-account item is left as it is, and a cancellation set for the end of the period is taken back, because choosing a plan is choosing to stay. The write sets the plan and the count outright, so a request that timed out can be sent again and lands once. Stripe’s own portal cannot offer any of this: it refuses to update a subscription carrying more than one line, and every subscription here carries the AI meter. Only an owner of the team, signed in on screen.

## Request body

- object
  - `plan` 'owner' | 'pro' | 'agency', required

## Response `200`

The plan the team is on now.

- object
  - `ok` unknown, required
  - `data` object, required
    - `plan` 'owner' | 'pro' | 'agency', required: The plan the team is on now.
    - `quantity` integer, required: Units it is billed for, the portfolio’s own count.
  - `meta` object, required
    - `requestId` string, required: Echoed in the x-request-id header. Quote it in a bug report.

## Other responses

- `400`: A plan not sold here, or one whose range does not cover the portfolio’s units (`details.reason` `units`). Nothing changed.
- `403`: A caller who is not an owner of the team (`details.reason` `owner_only`), or one using an access token rather than a signed-in session (`on_screen`).
- `409`: The team has no plan in trial, active or past due to change (`details.reason` `no_plan`). Start one with `/billing/checkout`.

---

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