Admin
GET /api/admin/admins
Section titled “GET /api/admin/admins”List Admins
List all platform admins, joined to user + adder info.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | PlatformAdminResponse[] |
| 422 | Validation Error | HTTPValidationError |
POST /api/admin/admins
Section titled “POST /api/admin/admins”Add Admin
Grant platform-admin access to an existing, already-registered user.
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
string | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Successful Response | PlatformAdminResponse |
| 422 | Validation Error | HTTPValidationError |
DELETE /api/admin/admins/{user_id}
Section titled “DELETE /api/admin/admins/{user_id}”Remove Admin
Revoke platform-admin access. Guards: no self-removal, no removing the last admin.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| user_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | Successful Response | |
| 422 | Validation Error | HTTPValidationError |
GET /api/admin/allowed-emails
Section titled “GET /api/admin/allowed-emails”List Allowed Emails
List all registration-allowlist entries.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | AllowedEmailResponse[] |
| 422 | Validation Error | HTTPValidationError |
POST /api/admin/allowed-emails
Section titled “POST /api/admin/allowed-emails”Add Allowed Email
Add an entry to the registration allowlist.
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
string | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Successful Response | AllowedEmailResponse |
| 422 | Validation Error | HTTPValidationError |
DELETE /api/admin/allowed-emails/{allowed_email_id}
Section titled “DELETE /api/admin/allowed-emails/{allowed_email_id}”Remove Allowed Email
Remove a registration-allowlist entry.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| allowed_email_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | Successful Response | |
| 422 | Validation Error | HTTPValidationError |
GET /api/admin/orgs
Section titled “GET /api/admin/orgs”List Orgs
List/search all organizations, cross-tenant, with per-org member counts.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| limit | query | integer | no | |
| offset | query | integer | no | |
| q | query | string | no | Search org name/slug (substring, case-insensitive) |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | OrgListResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/admin/orgs/{org_id}
Section titled “GET /api/admin/orgs/{org_id}”Get Org
Org detail plus its member roster.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | OrgDetailResponse |
| 422 | Validation Error | HTTPValidationError |
POST /api/admin/orgs/{org_id}/members
Section titled “POST /api/admin/orgs/{org_id}/members”Add Org Member
Add an EXISTING, already-registered user to an org. Never creates users or sends invites.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
string | yes | ||
| role | string | no |
Responses
| Status | Description | Body |
|---|---|---|
| 201 | Successful Response | OrgMemberInfo |
| 422 | Validation Error | HTTPValidationError |
PATCH /api/admin/orgs/{org_id}/members/{user_id}
Section titled “PATCH /api/admin/orgs/{org_id}/members/{user_id}”Update Org Member Role
Change a member’s role. Refuses if it would leave the org with 0 owners.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes | |
| user_id | path | string (uuid) | yes |
Request body (required)
| Field | Type | Required | Description |
|---|---|---|---|
| role | string | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | OrgMemberInfo |
| 422 | Validation Error | HTTPValidationError |
DELETE /api/admin/orgs/{org_id}/members/{user_id}
Section titled “DELETE /api/admin/orgs/{org_id}/members/{user_id}”Remove Org Member
Remove a member from an org. Refuses to remove the last OWNER.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes | |
| user_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 204 | Successful Response | |
| 422 | Validation Error | HTTPValidationError |
POST /api/admin/orgs/{org_id}/suspend
Section titled “POST /api/admin/orgs/{org_id}/suspend”Suspend Org
Suspend an organization — blocks regular member access via get_current_org.
Idempotent: calling this on an already-suspended org is a no-op (keeps the
original suspended_at timestamp, 200, no duplicate audit entry) rather
than 409 — this is a “make it so” action, safe to double-click from the UI.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | OrgSuspensionResponse |
| 422 | Validation Error | HTTPValidationError |
POST /api/admin/orgs/{org_id}/unsuspend
Section titled “POST /api/admin/orgs/{org_id}/unsuspend”Unsuspend Org
Lift a suspension. Idempotent no-op if the org isn’t currently suspended.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | OrgSuspensionResponse |
| 422 | Validation Error | HTTPValidationError |
GET /api/admin/orgs/{org_id}/usage
Section titled “GET /api/admin/orgs/{org_id}/usage”Get Org Usage
Usage summary for one org — same shape/service as the self-serve
/api/orgs/{org_id}/usage/summary endpoint, just without membership gating.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| org_id | path | string (uuid) | yes | |
| window | query | string | no | Counter/cost window: 24h, 7d, 30d (default 30d) |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | UsageSummaryResponse |
| 422 | Validation Error | HTTPValidationError |
POST /api/admin/users/{user_id}/deactivate
Section titled “POST /api/admin/users/{user_id}/deactivate”Deactivate User
Disable a user’s account. Guard: no self-deactivate.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| user_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | UserStatusResponse |
| 422 | Validation Error | HTTPValidationError |
POST /api/admin/users/{user_id}/reactivate
Section titled “POST /api/admin/users/{user_id}/reactivate”Reactivate User
Re-enable a previously deactivated user’s account.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| user_id | path | string (uuid) | yes |
Responses
| Status | Description | Body |
|---|---|---|
| 200 | Successful Response | UserStatusResponse |
| 422 | Validation Error | HTTPValidationError |