---
title: "Change the account's plan."
method: POST
path: "/v1/account/plan"
tags: ["billing"]
---

# Change the account's plan.

`POST /v1/account/plan`

## Request

- Base URL: `https://api.smolmachines.com`
- URL: `https://api.smolmachines.com/v1/account/plan`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/smolmachines/apis/smolfleet-api/docs/v1/account/plan/post.ts> (a function with typed inputs; its response is checked against the schema)

Moves the account to a self-serve plan; a plan with a fee is billed through the card on file. Requires the `billing:write` scope.

## Request body

- ChangePlanRequest: Ask to move this tenant onto a different plan. Only plans whose `self_serve` flag is set may be chosen; operator tiers are assigned by an admin.
  - `planId` string, required: Plan id to move onto, e.g. `plan-startup-paid`.

## Response `200`

The plan now in effect: a move onto a fee plan applies at once, a move off one when the paid period ends.

- PlanInfo: A reusable plan: quota + per-unit rates (money in integer micros) + budget.
  - `allowAlwaysOn` boolean, required
  - `budgetPolicy` string, required
  - `createdAt` string, required
  - `freeCreditMicros` integer: Recurring free credit applied to each billing period, in micros (e.g. 5_000_000 = $5/month free). Discount applies after volume tiers.
  - `id` string, required
  - `isDefault` boolean, required
  - `maxConcurrentMachines` integer, required
  - `maxCpus` integer, required
  - `maxDiskGb` integer, nullable: Largest disk (GB) one machine may request; `null` = platform maximum.
  - `maxEgressGb` integer, nullable
  - `maxGroups` integer, required
  - `maxMachines` integer, required
  - `maxMemoryMb` integer, required
  - `monthlyBudgetMicros` integer, nullable
  - `monthlyFeeMicros` integer, required: Flat recurring platform fee (micros per period); 0 = usage-only plan.
  - `name` string, required
  - `rateBaseHourMicros` integer: Per-machine-alive-hour "slot" fee in micros (e.g. 40_000 = $0.04/hr). Prices the held VM slot on top of consumed CPU/RAM — not allocated resources.
  - `rateCpuHourMicros` integer, required
  - `rateDiskGbHourMicros` integer
  - `rateEgressGbMicros` integer
  - `rateExecMicros` integer, required
  - `rateMemoryGbHourMicros` integer, required
  - `selfServe` boolean: Whether a tenant may switch itself onto this plan. Operator-only tiers are false and never appear in the self-serve list.

## Other responses

- `401`: Missing or invalid API key
- `402`: The plan's monthly fee has no saved card to bill (subscribe through /v1/account/plan/checkout instead), or the card was declined; the plan does not move.
- `403`: Key lacks the required scope
- `409`: Current usage exceeds the target plan's limits, or this account's plan is already changing
- `422`: That plan is not self-serve
- `429`: Rate limited; retry after the Retry-After header
- `500`: Internal error
- `503`: Paid plans are not enabled on this deployment

## Changes

- **2026-10-16** `bc31fc04a568`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/smolmachines/apis/smolfleet-api/changes/v1/account/plan/post.md)

---

[API](https://skmtc.dev/smolmachines/apis/smolfleet-api.md) - [All operations](https://skmtc.dev/smolmachines/apis/smolfleet-api/llms.txt) - [OpenAPI document](https://skmtc.dev/smolmachines/apis/smolfleet-api/revisions/bc31fc04a568?raw)
