Super People Docs
API Reference

Teams

Every team, and creating, renaming, recolouring and deleting them.

Every team, and creating, renaming, recolouring and deleting them.

Generated from the OpenAPI spec by npm run docs:api -w api. Do not edit this page — change the decorators in apps/api/src/ and regenerate.

Conventions

  • Auth — a session on every route: the cookie on web, the bearer token on mobile. See Authentication.
  • Errors — every non-2xx response has the body described in Errors.
  • Types — a ? after a field name means it is optional; | null means it is present but may be null.

Endpoints

GET /api/v1/teams — Every team

The whole list, unpaged — there are tens of these, not thousands. Cache it for the session and use it to resolve the team on a profile or directory row.

Returns 200 → TeamResponse[]

ErrorWhen
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.

POST /api/v1/teams — Create a team

Super admins only.

Body — CreateTeamDto

Returns 201 → TeamResponse

ErrorWhen
400The request was rejected. message is an array of field errors when validation failed.
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.

PATCH /api/v1/teams/{teamId} — Rename or recolour a team

Super admins only.

Path parameterTypeNotes
teamIdstring

Body — UpdateTeamDto

Returns 200 → TeamResponse

ErrorWhen
400The request was rejected. message is an array of field errors when validation failed.
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.
404No such team.

DELETE /api/v1/teams/{teamId} — Delete a team

Super admins only. Members are not deleted — they are left unassigned, and the response says how many.

Path parameterTypeNotes
teamIdstring

Returns 200 → TeamRemovedResponse

ErrorWhen
401No valid session. Clear the stored token and sign in again.
403Signed in, but not allowed to do this.
404No such team.

Data models

TeamResponse

FieldTypeNotes
idstring
namestring
colorblue | emerald | violet | amber | rose | cyan | orange | slateA palette token, not a CSS colour — map it to your own styles.
memberCountnumber

CreateTeamDto

FieldTypeNotes
namestring≤ 60 chars
color?blue | emerald | violet | amber | rose | cyan | orange | slate

UpdateTeamDto

FieldTypeNotes
name?string≤ 60 chars
color?blue | emerald | violet | amber | rose | cyan | orange | slate

TeamRemovedResponse

FieldTypeNotes
idstring
unassignednumberPeople whose team was cleared by the delete.

On this page