Plan

Edit a tariff tier

Edits a tier: only the sent fields change. Limits take -1 (unlimited), 0 or a positive integer; add-ons only their numbers (delta, maxQty, priceUsd) — the set of add-on codes comes from migrations. Existing workspace and tenant plans are NOT changed: an edit applies to plans put on the tier afterwards. Recorded as entity_event `tier.edited` (old/new). Requires WorkspacePlanUpdate for a workspace tier, TenantPlanUpdate for a tenant tier: root, Owner, SuperAdmin.

PATCH
/api/v2/plans/{code}

Authorization

BearerAuthObject
AuthorizationBearer <token>

In: header

Path Parameters

code*string

Tier code

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://example.com/api/v2/plans/business" \  -H "Content-Type: application/json" \  -d '{}'
{  "code": "starter",  "name": "Starter",  "kind": "workspace",  "priceMonthUsd": 69,  "priceYearUsd": 690,  "limits": [    {      "key": "max_keys",      "value": 6000    }  ],  "addons": [    {      "code": "keys_500",      "limitKey": "max_keys",      "delta": 500,      "maxQty": 8,      "priceUsd": 5    }  ]}
{  "errors": {    "name": "Empty value"  }}
{  "message": {    "error": "Your request was made with invalid credentials."  }}
{  "message": {    "error": "You are not allowed to perform this action."  }}
{  "message": {    "error": "Page not found"  }}
{  "message": {    "error": "Oops! Something went wrong! Write to administrator. Your Request Id {f1177aee-9a99-42f0-a23f-4dd29fc39b65-672e0df972ccb}"  }}