POST /api/v1/admin/orgs/:slug/teams
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/:slug/teams
Section titled “POST /api/v1/admin/orgs/:slug/teams”Authentication
Section titled “Authentication”Requires the following capability(ies):
projects:w
Middleware
Section titled “Middleware”Other middleware observed on this route (heuristic):
requireCapabilityadminBodyLimit
Description
Section titled “Description”--- Teams ------------------------------------------------------------------
Teams sit between the org and its projects in the policy hierarchy
(system → org → team → project). A team groups related projects so a
platform/security team can set posture once for a group instead of
project-by-project. config holds a PolicyPatch JSON; merged between org
and project at request time (see middleware/org-api-key.resolveOrgContext).
POST /api/v1/admin/orgs/:slug/teams — create a team.
Body: { “slug”: “platform-sec”, “name”: “Platform Security”, “policies”?:
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 (lowercase, alphanumeric + hyphens, ≤128 chars)"}HTTP 400
Section titled “HTTP 400”{ "error": "name is required (1..128 chars)"}HTTP 404
Section titled “HTTP 404”{ "error": "Org not found"}HTTP 400
Section titled “HTTP 400”{ "error": <member-expr>}HTTP 409
Section titled “HTTP 409”{ "error": "Team with that slug already exists in this org"}HTTP 201
Section titled “HTTP 201”{ "team": <member-expr>}Source
Section titled “Source”- File:
src/admin/routes.ts - Line: 4807