Skip to main content

Admin API overview

How the admin dashboard talks to MCDI: the admin session it needs and every endpoint at a glance, grouped by area.

These endpoints serve the admin dashboard and are not meant for projects. They need an admin session, a system administrator signed in with Discord. The dashboard sends the session as a cookie; in Swagger you give it as a Bearer token.

The endpoints for projects are in the Project API.

79 endpoints in 14 groups.

Admin Settings

MethodPathSummary
GET/api/admin/profileGet the current admin profile
PATCH/api/admin/profileUpdate the admin profile
GET/api/admin/settingsGet effective system settings
PATCH/api/admin/settingsUpdate editable settings
POST/api/admin/settings/resetReset editable settings to environment defaults

Audit

MethodPathSummary
GET/api/admin/audit/logsGet audit logs
GET/api/admin/audit/logs/exportExport audit logs as CSV

Authentication

MethodPathSummary
GET/api/auth/admin/discordInitiate system admin Discord OAuth2 login
POST/api/auth/admin/logoutLog out of the admin dashboard
GET/api/auth/admin/meGet current system admin profile
POST/api/auth/cleanupCleanup expired sessions (maintenance)

Channels

MethodPathSummary
GET/api/admin/servers/{serverId}/channelsList all channels in a server (admin session)
GET/api/admin/servers/{serverId}/channels/{channelId}Get channel details (admin session)
GET/api/admin/servers/{serverId}/channels/{channelId}/messagesGet recent messages from a channel (admin session)

Inbound Webhooks (Admin)

MethodPathSummary
GET/api/admin/inbound-webhooksList inbound webhooks
POST/api/admin/inbound-webhooksCreate an inbound webhook
POST/api/admin/inbound-webhooks/schema/previewCheck a schema and preview its docs
GET/api/admin/inbound-webhooks/settingsGet the inbound webhook settings
PUT/api/admin/inbound-webhooks/settingsReplace the default reader roles
GET/api/admin/inbound-webhooks/{id}Get one inbound webhook
PATCH/api/admin/inbound-webhooks/{id}Update an inbound webhook
DELETE/api/admin/inbound-webhooks/{id}Delete an inbound webhook and all its submissions
GET/api/admin/inbound-webhooks/{id}/docsExport developer documentation for this webhook
GET/api/admin/inbound-webhooks/{id}/rolesList the Discord roles permitted to read submissions
PUT/api/admin/inbound-webhooks/{id}/rolesReplace the read-access role grants
POST/api/admin/inbound-webhooks/{id}/rotate-secretRotate the signing secret

Inbound Webhooks (Read)

MethodPathSummary
GET/api/inbound-webhooksList the inbound webhooks I am permitted to read
GET/api/inbound-webhooks/{id}/submissionsList submissions
GET/api/inbound-webhooks/{id}/submissions/{submissionId}Get one submission

Members

MethodPathSummary
GET/api/admin/membersList members with optional server, role, filter and search criteria (paginated)
GET/api/admin/members/cross-serverList members across servers (paginated)
GET/api/admin/members/exportExport members report
GET/api/admin/members/{discordId}/serversGet member cross-server view

Monitoring

MethodPathSummary
GET/api/admin/monitoring/auth-failuresRecent authentication failures
GET/api/admin/monitoring/healthSystem health check
GET/api/admin/monitoring/usageAPI usage statistics

Permissions

MethodPathSummary
POST/api/permissions/admin/servers/{serverId}/roles/{roleId}/impactPreview impact of a permission change on a role
GET/api/permissions/admin/servers/{serverId}/roles/{roleId}/permissionsGet all permissions assigned to a role
POST/api/permissions/admin/servers/{serverId}/roles/{roleId}/permissionsAdd permissions to a role
DELETE/api/permissions/admin/servers/{serverId}/roles/{roleId}/permissions/{permissionId}Remove a permission from a role
GET/api/permissions/inheritance-rulesList inheritance rules
POST/api/permissions/inheritance-rulesCreate or update an inheritance rule

Projects

MethodPathSummary
GET/api/admin/projectsList all projects
POST/api/admin/projectsCreate a project
GET/api/admin/projects/access/auditList access change audit logs
GET/api/admin/projects/access/matrixList full project-server access matrix
GET/api/admin/projects/servers/{serverId}/projectsList projects that can access a server
GET/api/admin/projects/{id}Get a project by ID
PATCH/api/admin/projects/{id}Update a project
DELETE/api/admin/projects/{id}Delete a project
GET/api/admin/projects/{id}/api-keyReveal project API key info
DELETE/api/admin/projects/{id}/keyRevoke API key
PATCH/api/admin/projects/{id}/redirect-uriUpdate allowed redirect URI(s)
POST/api/admin/projects/{id}/regenerate-api-keyRegenerate project API key (admin)
POST/api/admin/projects/{id}/restore-keyRestore a revoked API key
GET/api/admin/projects/{projectId}/serversList servers accessible by a project
PUT/api/admin/projects/{projectId}/servers/{serverId}Grant or update project access to a server
DELETE/api/admin/projects/{projectId}/servers/{serverId}Revoke project access to a server

Servers

MethodPathSummary
GET/api/serversList all servers
POST/api/serversRegister a server
GET/api/servers/{serverId}Get a server by ID
PATCH/api/servers/{serverId}Update server settings
DELETE/api/servers/{serverId}Delete a server
PATCH/api/servers/{serverId}/disableDisable a server
PATCH/api/servers/{serverId}/enableEnable a server

Statistics

MethodPathSummary
GET/api/admin/stats/cross-serverCross-server member overlap
GET/api/admin/stats/exportExport a statistics report as CSV or JSON
GET/api/admin/stats/membersAggregate member statistics
GET/api/admin/stats/members/growthMember growth over time
GET/api/admin/stats/rolesRole distribution (scoped or cross-server)
GET/api/admin/stats/serversServer-level statistics

Sync

MethodPathSummary
POST/api/admin/sync/fullTrigger a full sync
GET/api/admin/sync/logsGet paginated sync logs for a server
GET/api/admin/sync/logs/{syncLogId}/changesGet granular change details for a specific sync log
GET/api/admin/sync/statusGet the latest sync status for a specific server
GET/api/admin/sync/status/allGet latest sync status for all active servers

Webhooks

MethodPathSummary
GET/api/admin/projects/{projectId}/webhooksList a project's webhooks (admin session)
GET/api/admin/webhooks/{webhookId}Get webhook details (admin session)
DELETE/api/admin/webhooks/{webhookId}Delete a webhook (admin session)

Source: apps/api/openapi.json.