Update a plan
Requires billing:write. Changes what a plan says about itself, and whether it is still sold. Send only the fields you are changing.
There is no separate archive endpoint: archived is a state a plan can come back from, so true withdraws it from the pricing table and false puts it back. Archiving is idempotent — the date it stopped being sold does not move if you archive it twice. Nothing is deleted, because subscriptions point at plans and a deleted plan is a subscription that cannot say what it is for.
key is refused rather than ignored: a caller sending it believes it will change, and dropping it in silence is how your own gate stops matching a plan nobody told you was renamed.
Authorizations
A staff session token, uk_st_…. Minted by sign-up, sign-in or the two-factor exchange.
Headers
The organization the caller is acting on — the org_… code that appears in the panel URL. It identifies; the membership JOIN is what authorizes, so a forged code reads nothing. Absent, the session's default organization answers.
Path Parameters
The plan.
Query Parameters
Which environment to act in. A view parameter, valid only on the staff surface — a machine credential never chooses its environment, it is resolved from the key.
live, test Body
Response
The plan as it now stands. prices and features are not included — re-read the catalogue for those.
A plan you sell. Its prices and the features it carries come with it, because a pricing table needs all of them at once.
Your own stable handle for the plan — lowercase letters, digits, _, - and .. Unique within an environment, and what promoting a catalogue to live matches on.
"pro"
Where the plan sits on a pricing table.
No longer sold. Archived rather than deleted, because subscriptions point at it.