---
title: "Update a plan."
method: PATCH
path: "/v1/plans/{id}"
tags: ["plans"]
---

# Update a plan.

`PATCH /v1/plans/{id}`

## Request

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

Changes a plan's price or limits. Requires the `admin` scope.

## Path parameters

- `id` string, required

## Request body

- UpdatePlanRequest: `PATCH /v1/plans/{id}`: change a plan's limits in place. Every field is optional; only the given ones change. Takes effect on the next machine create for every tenant on the plan.
  - `maxConcurrentMachines` integer, nullable
  - `maxCpus` integer, nullable
  - `maxDiskGb` integer, nullable
  - `maxMachines` integer, nullable
  - `maxMemoryMb` integer, nullable

## Response `200`

Plan updated; applies from the next machine create

- 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
- `403`: Key lacks the required scope
- `404`: Plan not found
- `429`: Rate limited; retry after the Retry-After header
- `500`: Internal error

## Changes

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

[Operation history](https://skmtc.dev/smolmachines/apis/smolfleet-api/changes/v1/plans/:id/patch.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)
