Skip to content

POST /api/v1/admin/orgs/:slug/projects

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):

  • projects:w

Other middleware observed on this route (heuristic):

  • requireCapability
  • adminBodyLimit

POST /api/v1/admin/orgs/:slug/projects — create a project. Body: { “name”: “team-payments”, “teamId”?: ”…”, “policies”?: }. teamId (optional) binds the project to a team in the same org, so the team’s policy patch is merged between org and project at request time. A teamId belonging to a different org is rejected. #336 — gated on projects:w.

{
"error": "Invalid JSON body"
}
{
"error": "Body must be a JSON object"
}
{
"error": "name is required (1..128 chars)"
}
{
"error": "Org not found"
}
{
"error": "teamId must be a string"
}
{
"error": "Team not found in this org"
}
{
"error": <member-expr>
}
{
"error": "Project with that name already exists in this org"
}
{
"project": <member-expr>
}
  • File: src/admin/routes.ts
  • Line: 4549