admin role.
Get system stats
Retrieve system-wide statistics.Response
Total number of users
Total number of books in the system
Total number of libraries
Total number of organizations
List users
Get all users in the system.Response
Array of user objects:User ID
User email
User display name
User role
Whether user is banned
Whether email is verified
ISO timestamp
Ban user
Ban a user from the system.Input
User ID to ban
Response
Always
trueUnban user
Remove a ban from a user.Input
User ID to unban
Response
Always
trueSet user role
Change a user’s role.Input
User ID
New role:
user or adminResponse
Always
trueList organizations
Get all organizations in the system.Response
Array of organization objects:Organization ID
Organization name
Organization slug (unique identifier)
ISO timestamp
Number of members
Create organization
Create a new organization.Input
Organization name (minimum 1 character)
Organization slug (minimum 1 character, must be unique)
Response
Created organization object.Delete organization
Delete an organization and all its data.Input
Organization ID
Response
Always
trueGet organization with members
Retrieve detailed organization information including all members.Input
Organization ID
Response
Organization ID
Organization name
Organization slug
Remove member
Remove a member from an organization.Input
Member ID (not user ID)
Response
Always
trueUpdate member role
Change a member’s role within an organization.Input
Member ID
New role (organization-specific role)
Response
Always
trueBackfill cover colors
Trigger a background job to extract dominant colors from book covers that are missing color information.Response
Number of books queued for color extraction
Admin authorization
All admin endpoints useadminProcedure, which requires:
- An authenticated session (
UNAUTHORIZEDif missing) - The
adminrole (FORBIDDENif not admin)