GET /admin/orgsList all organizations (super-admin)
Super-admin only. Cross-tenant org list with member/project counts. Excludes soft-deleted orgs.
Auth: Bearer token required
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | AdminOrgList |
401 | Unauthorized | Error |
403 | Forbidden | Error |
GET /admin/orgs/{id}Get organization detail (super-admin)
Super-admin only. Org fields plus member and project lists.
Auth: Bearer token required
Path parameters
| Name | Type | Description |
|---|---|---|
id | string | Organization ID |
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | AdminOrgDetail |
401 | Unauthorized | Error |
403 | Forbidden | Error |
404 | Not Found | Error |
POST /admin/orgs/{id}/suspendSuspend an organization (super-admin)
Super-admin only. Sets suspended_at = now(). Idempotent. Audited in the same transaction.
Auth: Bearer token required
Path parameters
| Name | Type | Description |
|---|---|---|
id | string | Organization ID |
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | AdminOrgSuspendResult |
401 | Unauthorized | Error |
403 | Forbidden | Error |
404 | Not Found | Error |
POST /admin/orgs/{id}/unsuspendUnsuspend an organization (super-admin)
Super-admin only. Clears suspended_at. Audited in the same transaction.
Auth: Bearer token required
Path parameters
| Name | Type | Description |
|---|---|---|
id | string | Organization ID |
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | AdminOrgSuspendResult |
401 | Unauthorized | Error |
403 | Forbidden | Error |
404 | Not Found | Error |
GET /admin/auditList control-plane admin audit events
Super-admin only. Paginated, filterable list of control-plane audit events — super-admin actions, plus platform events that belong to no tenant (a GitHub installation.created arriving before any org owns the installation). Behind the /admin/* session + requireSuperAdmin mount.
Auth: Bearer token required
Query parameters
| Name | Type | Description |
|---|---|---|
limit | integer | Max results (1-200) |
offset | integer | Pagination offset |
actor | string | Filter by actor user ID |
action | string | Filter by action name |
resourceKind | string | Filter by resource kind |
since | string(date-time) | ISO 8601 datetime lower bound |
until | string(date-time) | ISO 8601 datetime upper bound |
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | AdminAuditList |
401 | Unauthorized | Error |
403 | Forbidden | Error |
GET /admin/metrics/overviewControl-plane metrics overview
Super-admin only. User/session/signup counts for the control-plane dashboard. Behind the /admin/* session + requireSuperAdmin mount.
Auth: Bearer token required
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | AdminMetricsOverview |
401 | Unauthorized | Error |
403 | Forbidden | Error |
DELETE /admin/projects/{projectId}/nukeWipe a project's data (super-admin)
Super-admin only. Destroys every row in every table the target project's data reaches, leaving the project itself, its members, its repo links, its tokens, and its audit trail. Counts are keyed by SQL table name. Idempotent.
Auth: Bearer token required
Path parameters
| Name | Type | Description |
|---|---|---|
projectId | string | Project ID to nuke |
Query parameters
| Name | Type | Description |
|---|---|---|
orgId | string | Disambiguates when the project name exists in more than one org |
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | NukeResult |
401 | Unauthorized | Error |
403 | Forbidden | Error |
GET /admin/orphansPreview rows whose organization no longer exists (super-admin)
Super-admin only. Groups the purgeable rows by table and by the org id they name, which resolves to no organization. Reads through the orphan-purge role, so a row belonging to a live org is not in the relation at all — this cannot report one. Behind the /admin/* session + requireSuperAdmin mount.
Auth: Bearer token required
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | OrphanSurvey |
401 | Unauthorized | Error |
403 | Forbidden | Error |
DELETE /admin/orphansDelete rows whose organization no longer exists (super-admin)
Super-admin only. Hard-deletes every row the survey reports and returns the per-table counts. Irreversible: these rows outlived their org deliberately, so this is an operator act — preview with GET first. Behind the /admin/* session + requireSuperAdmin mount.
Auth: Bearer token required
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | OrphanPurgeResult |
401 | Unauthorized | Error |
403 | Forbidden | Error |
GET /admin/integrations/github-installationsList all GitHub installations (super-admin)
Super-admin only. Cross-tenant list of every GitHub App installation. No pagination. Behind the /admin/* session + requireSuperAdmin mount.
Auth: Bearer token required
Responses
| Status | Description | Schema |
|---|---|---|
200 | OK | AdminGithubInstallationList |
401 | Unauthorized | Error |
403 | Forbidden | Error |
AdminAuditEvent| Field | Type | Description |
|---|---|---|
id | string | (required) |
actorUserId | string | (required) |
action | string | (required) |
resourceKind | string | (required) |
resourceId | string | null | (required) |
payload | object | (required) |
createdAt | string | string | (required) |
AdminAuditList| Field | Type | Description |
|---|---|---|
data | AdminAuditEvent[] | (required) |
total | integer | (required) |
limit | integer | (required) |
offset | integer | (required) |
AdminGithubInstallation| Field | Type | Description |
|---|---|---|
id | string | (required) |
githubInstallationId | string | (required) |
githubOrgLogin | string | (required) |
status | string | (required) |
grantedReposCount | integer | (required) |
installedAt | string | string | (required) |
lastEventAt | string | string | (required) |
orgName | string | null | (required) |
orgSlug | string | null | (required) |
AdminGithubInstallationList| Field | Type | Description |
|---|---|---|
data | AdminGithubInstallation[] | (required) |
AdminMetricsOverview| Field | Type | Description |
|---|---|---|
totalUsers | integer | (required) |
signups24h | integer | (required) |
signups7d | integer | (required) |
signups30d | integer | (required) |
activeSessions | integer | (required) |
mauApprox | integer | (required) |
AdminOrgDetail| Field | Type | Description |
|---|---|---|
id | string | (required) |
name | string | (required) |
slug | string | (required) |
logo | string | null | (required) |
createdAt | string | string | (required) |
metadata | string | null | (required) |
suspendedAt | string | string | null | (required) |
members | AdminOrgMember[] | (required) |
projects | AdminOrgProject[] | (required) |
AdminOrgList| Field | Type | Description |
|---|---|---|
data | AdminOrgSummary[] | (required) |
AdminOrgMember| Field | Type | Description |
|---|---|---|
userId | string | (required) |
email | string | (required) |
username | string | null | (required) |
name | string | null | (required) |
role | string | (required) |
joinedAt | string | string | (required) |
AdminOrgProject| Field | Type | Description |
|---|---|---|
id | string | (required) |
name | string | (required) |
slug | string | (required) |
createdAt | string | string | (required) |
AdminOrgSummary| Field | Type | Description |
|---|---|---|
id | string | (required) |
name | string | (required) |
slug | string | (required) |
createdAt | string | string | (required) |
suspendedAt | string | string | null | (required) |
memberCount | integer | (required) |
projectCount | integer | (required) |
AdminOrgSuspendResult| Field | Type | Description |
|---|---|---|
id | string | (required) |
suspendedAt | string | string | null | (required) |
Error| Field | Type | Description |
|---|---|---|
error | string | (required) |
code | string |
NukeResult| Field | Type | Description |
|---|---|---|
projectId | string | (required) |
rowCountsDeleted | object | (required) |
OrphanPurgeResult| Field | Type | Description |
|---|---|---|
deleted | object | (required) |
total | integer | (required) |
OrphanSurvey| Field | Type | Description |
|---|---|---|
groups | OrphanedRowGroup[] | (required) |
total | integer | (required) |
OrphanedRowGroup| Field | Type | Description |
|---|---|---|
table | string | (required) |
orgId | string | (required) |
rows | integer | (required) |