Skip to content

POST /api/v1/admin/orgs

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.

No requireCapability middleware detected on this route. Surface-level auth (admin token, dashboard session, org API key, anonymous proxy) is enforced by the parent router — see Source below.

Other middleware observed on this route (heuristic):

  • adminBodyLimit

POST /api/v1/admin/orgs — create org with a slug and optional initial policies. JWKS configuration for the scanner callback endpoint is not yet part of this PR; operators set tenants.jwks_public_key / jwks_url directly.

{
"error": "Invalid JSON body"
}
{
"error": "Body must be a JSON object"
}
{
"error": "slug is required and must match /^[a-z0-9][a-z0-9-]{0,127}$/"
}
{
"error": <template-string>
}
{
"error": <member-expr>
}
{
"error": "Org with that slug already exists"
}
{
"org": <member-expr>
}
  • File: src/admin/routes.ts
  • Line: 3882