Skip to content

Users

Endpoints

GET    /api/v1/admin/users        list — query params: search, isActive, page, pageSize
GET    /api/v1/admin/users/:id    fetch one
PUT    /api/v1/admin/users/:id    update
DELETE /api/v1/admin/users/:id    delete

Every endpoint requires admin permission.

Editable fields

  • name
  • permissions[] — toggle "admin" on or off
  • isActive — soft-suspend a user (login blocked)
  • isVerified — flip the OTP-verification flag (rarely needed; an admin can set this manually if SMTP fails for a single user)

Email and username are read-only here — changing them requires the user to re-verify.

Frontend

The list at /admin/users supports search, an isActive filter, and pagination (default pageSize: 25). Click a row to open the edit drawer.

Notes

  • Deleting a user is permanent — their owned workspaces, posts, and AI runs cascade per the data-model rules. Prefer isActive: false for routine suspensions.
  • The default user record has permissions: ["user"]. Add "admin" to grant the admin panel; remove it to revoke without otherwise touching the account.