Skip to content

PATCH /api/v1/admin/orgs/:slug/tier

This page is auto-generated from src/admin/routes.ts. Do not edit by hand — see docs/dev/docs-auto-sync.md.

:warning: Heuristic extraction — not a contract. Response shapes below are mined from c.json(...) literals in the handler via an AST walker. Computed fields, ternaries, and non-literal returns are shown as placeholders. Refer to the linked source file for the authoritative behaviour.

Requires the following capability(ies):

  • billing:w

Other middleware observed on this route (heuristic):

  • requireCapability
  • adminBodyLimit

PATCH /api/v1/admin/orgs/:slug/tier — #216. Sets the org’s tier. Validates against the enum; on a real change, emits a tier_changed audit row with from→to so billing/compliance can trace every tier movement.

Why this is its own endpoint rather than folded into a generic org-update: tier is the single billing-sensitive field; isolating its audit + RBAC surface (once #116 lands) keeps the trail unambiguous. #336 — gated on billing:w (tier == billing plan; owner-only by default).

{
"error": "Invalid JSON"
}
{
"error": <template-string>
}
{
"error": "Org not found"
}
{
"id": <member-expr>,
"slug": <member-expr>,
"tier": <tier>
}
  • File: src/admin/routes.ts
  • Line: 4339