Admin — Members
Super-admin member management: create employees, activate or deactivate them, reset passwords, change roles, feature contributors.
Super-admin member management: create employees, activate or deactivate them, reset passwords, change roles, feature contributors.
Generated from the OpenAPI spec by
npm run docs:api -w api. Do not edit this page — change the decorators inapps/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;| nullmeans it is present but may be null. - Guide — Roles and Visibility.
Endpoints
GET /api/v1/admin/members — Every member, including the hidden ones
Super admins only. Wider than the directory: it carries emails, roles and the deactivated accounts the people-facing screens leave out.
Returns 200 → AdminMemberResponse[]
| Error | When |
|---|---|
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
POST /api/v1/admin/members — Create an employee
Super admins only. Creates the login and the profile in one call, and returns the profile. The password is set here and is not emailed to them.
Body — CreateMemberDto
Returns 201 → ProfileResponse
| Error | When |
|---|---|
400 | The request was rejected. message is an array of field errors when validation failed. |
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
PATCH /api/v1/admin/members/{userId}/status — Activate or deactivate somebody
Deactivating revokes their sessions and drops them out of the directory and org chart. Their posts and history are kept.
| Path parameter | Type | Notes |
|---|---|---|
userId | string |
Body — SetStatusDto
Returns 200 → ProfileResponse
| Error | When |
|---|---|
400 | The request was rejected. message is an array of field errors when validation failed. |
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
404 | No such person. |
PATCH /api/v1/admin/members/{userId}/password — Set a new password for somebody
Super admins only — the way back in for a member who has forgotten their password. Signs them out of every session, unless the password is your own. The password is not emailed to them.
| Path parameter | Type | Notes |
|---|---|---|
userId | string |
Body — SetPasswordDto
Returns 200 → AdminMemberResponse
| Error | When |
|---|---|
400 | The request was rejected. message is an array of field errors when validation failed. |
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
404 | No such person. |
PATCH /api/v1/admin/members/{userId}/role — Change somebody’s access level
A super admin can post announcements, moderate and manage members.
| Path parameter | Type | Notes |
|---|---|---|
userId | string |
Body — SetRoleDto
Returns 200 → ProfileResponse
| Error | When |
|---|---|
400 | The request was rejected. message is an array of field errors when validation failed. |
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
404 | No such person. |
PATCH /api/v1/admin/members/{userId}/featured — Pin somebody to Top Contributors
note replaces the post count under their name.
| Path parameter | Type | Notes |
|---|---|---|
userId | string |
Body — SetFeaturedDto
Returns 200 → ProfileResponse
| Error | When |
|---|---|
400 | The request was rejected. message is an array of field errors when validation failed. |
401 | No valid session. Clear the stored token and sign in again. |
403 | Signed in, but not allowed to do this. |
404 | No such person. |
Data models
AdminMemberResponse
| Field | Type | Notes |
|---|---|---|
id | string | |
name | string | |
email | string | |
image | string | null | |
title | string | |
role | member | super_admin | |
status | active | pending | deactivated | |
managerId | string | null | |
managerName | string | null | |
joinedAt | string ISO 8601 | |
isFeatured | boolean | Pinned to the top of the feed's Top Contributors panel. |
featuredNote | string | Shown under the name instead of a post count, when pinned. |
CreateMemberDto
| Field | Type | Notes |
|---|---|---|
name | string | ≤ 120 chars |
email | string | |
password | string | ≤ 200 chars |
title? | string | ≤ 120 chars |
managerId? | string | |
department? | "" | engineering | product | design | hr | business_development | digital_marketing | finance | operations | support | legal | Their designation, which is what the work timeline is worded from. |
teamId? | string | An existing team's id. The form creates the team first if it is new. |
role? | member | super_admin |
ProfileResponse
| Field | Type | Notes |
|---|---|---|
id | string | |
name | string | |
email | string | |
role | member | super_admin | |
image | string | null | A path under /api/v1/files/avatars/... — resolve against the API origin. |
title | string | |
location | string | |
bio | string | |
currentWork | string | What they are working on right now. |
department | "" | engineering | product | design | hr | business_development | digital_marketing | finance | operations | support | legal | '' when they have not picked a team yet. |
team | ProfileTeamResponse | null | |
skills | string[] | |
learningInterests | string[] | |
projects | ProjectResponse[] | |
instagram | string | |
linkedin | string | |
github | string | |
x | string | X, formerly Twitter. |
youtube | string | |
portfolio | string | A personal site. |
hobbies | string[] | |
interests | string[] | |
favoriteMusic | string | |
favoriteMovie | string | |
favoriteFood | string | |
funFact | string | |
dreamDestination | string | |
superpower | string | |
drink | string | Whatever they actually drink — not a fixed set. |
joinedAt | string ISO 8601 | When the login was provisioned — not when the person joined. |
joinedOn | string | null | Employment start date, YYYY-MM-DD, set by a super admin. Prefer it over joinedAt wherever a joining date is shown; null until one is set. |
dateOfBirth | string | null | Date of birth, YYYY-MM-DD. Returned only to the person themselves and to super admins — null for everyone else, and until it is set. |
status | active | pending | deactivated | |
presence | active | away | offline | Whether they are here right now, computed from heartbeats — unrelated to status, which is about the account. Everyone never seen is offline. |
lastSeenAt | string ISO 8601 | null | When a client of theirs was last open. Null if never. |
postCount | number | |
manager | ManagerResponse | null | |
reportCount | number | How many people report to them. |
isComplete | boolean | Whether the profile has enough filled in to stop nagging about it. |
ProfileTeamResponse
| Field | Type | Notes |
|---|---|---|
id | string | |
name | string | |
color | blue | emerald | violet | amber | rose | cyan | orange | slate | A palette token, not a CSS colour — map it to your own styles. |
ProjectResponse
| Field | Type | Notes |
|---|---|---|
id | string | |
name | string | |
description | string | Empty string when unset, never null. |
contribution | string | Superseded by contributions; still filled for older rows. |
role | string | |
startedAt | string | null | |
endedAt | string | null | null while the work is still running — show it as "Present". |
status | in_progress | completed | on_hold | |
tags | string[] | |
contributions | string[] | The "Key Contributions" bullets. |
link | string | Empty string when unset, never null. |
ManagerResponse
| Field | Type | Notes |
|---|---|---|
id | string | |
name | string | |
image | string | null |
SetStatusDto
| Field | Type | Notes |
|---|---|---|
status | active | deactivated |
SetPasswordDto
| Field | Type | Notes |
|---|---|---|
password | string | ≤ 128 chars |
SetRoleDto
| Field | Type | Notes |
|---|---|---|
role | member | super_admin |
SetFeaturedDto
| Field | Type | Notes |
|---|---|---|
featured | boolean | |
note? | string | Shown under the name in Top Contributors instead of a post count. · ≤ 120 chars |