POST /api/v1/admin/orgs
This page is auto-generated from
src/admin/routes.ts. Do not edit by hand — seedocs/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.
POST /api/v1/admin/orgs
Section titled “POST /api/v1/admin/orgs”Authentication
Section titled “Authentication”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.
Middleware
Section titled “Middleware”Other middleware observed on this route (heuristic):
adminBodyLimit
Description
Section titled “Description”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.
Responses
Section titled “Responses”HTTP 400
Section titled “HTTP 400”{ "error": "Invalid JSON body"}HTTP 400
Section titled “HTTP 400”{ "error": "Body must be a JSON object"}HTTP 400
Section titled “HTTP 400”{ "error": "slug is required and must match /^[a-z0-9][a-z0-9-]{0,127}$/"}HTTP 400
Section titled “HTTP 400”{ "error": <template-string>}HTTP 400
Section titled “HTTP 400”{ "error": <member-expr>}HTTP 409
Section titled “HTTP 409”{ "error": "Org with that slug already exists"}HTTP 201
Section titled “HTTP 201”{ "org": <member-expr>}Source
Section titled “Source”- File:
src/admin/routes.ts - Line: 3882