Skip to main content

Servers

Register, update, disable, enable and remove the Discord servers MCDI knows about.

Discord server registration and lifecycle management - system admin only

List all servers

GET/api/servers

Returns all registered servers with their current sync health data.

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
isActivequerybooleannoFilter by active/inactive status.
isMainquerybooleannoFilter by main server status.
typequerystringnoFilter by server type (e.g. official, partner, other).
namequerystringnoFilter by server name (case-insensitive partial match).

Responses

StatusDescriptionBody
200Servers retrieved successfully.
400Invalid parameter format.
401Authentication required.
403System admin access required.

Open in Swagger (opens in a new tab)

Register a server

POST/api/servers

Registers a new Discord guild with MCDI (upsert by guild ID). Once registered, the server can be granted to projects and included in syncs.

Authentication: Admin session token (Authorization: Bearer <token>)

Request body (JSON, required): CreateServerDto schema.

Responses

StatusDescriptionBody
201Server registered successfully.
400Invalid request body.
401Authentication required.
403System admin access required.

Open in Swagger (opens in a new tab)

Get a server by ID

GET/api/servers/{serverId}

Returns a single server record by its Discord guild snowflake ID.

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord guild snowflake ID

Responses

StatusDescriptionBody
200Server retrieved successfully.
400Invalid server ID format.
401Authentication required.
403System admin access required.
404Server not found.

Open in Swagger (opens in a new tab)

Update server settings

PATCH/api/servers/{serverId}

Updates the server name or other mutable settings.

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord guild snowflake ID

Request body (JSON, required): UpdateServerDto schema.

Responses

StatusDescriptionBody
200Server updated successfully.
400Invalid request body.
401Authentication required.
403System admin access required.
404Server not found.

Open in Swagger (opens in a new tab)

Delete a server

DELETE/api/servers/{serverId}

Permanently removes a server and all associated data (members, roles, sync logs). This cannot be undone.

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord guild snowflake ID

Responses

StatusDescriptionBody
204Server deleted successfully.
400Invalid server ID format.
401Authentication required.
403System admin access required.
404Server not found.

Open in Swagger (opens in a new tab)

Disable a server

PATCH/api/servers/{serverId}/disable

Marks the server as inactive. Disabled servers are excluded from syncs and all API permission/member checks return 403.

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord guild snowflake ID

Request body (JSON, required): DisableServerDto schema.

Responses

StatusDescriptionBody
200Server disabled successfully.
400Invalid server ID format.
401Authentication required.
403System admin access required.
404Server not found.

Open in Swagger (opens in a new tab)

Enable a server

PATCH/api/servers/{serverId}/enable

Re-activates a previously disabled server.

Authentication: Admin session token (Authorization: Bearer <token>)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord guild snowflake ID

Responses

StatusDescriptionBody
200Server enabled successfully.
400Invalid server ID format.
401Authentication required.
403System admin access required.
404Server not found.

Open in Swagger (opens in a new tab)

Schemas

CreateServerDto schema

FieldTypeRequiredDescription
defaultPermissionPolicy"deny_all" or "allow_all" or "custom"noDefault: "deny_all".
disabledReasonstring or nullno
guildIdstringyesDiscord guild ID
iconstring or nullno
isActivebooleannoDefault: true.
isMainbooleannoDefault: false.
namestringno
syncFrequencyHoursnumbernoSync frequency in hours
type"main" or "competition" or "event" or "other"noServer category type Default: "other".

DisableServerDto schema

FieldTypeRequiredDescription
disabledReasonstringno

UpdateServerDto schema

FieldTypeRequiredDescription
defaultPermissionPolicy"deny_all" or "allow_all" or "custom"noDefault: "deny_all".
iconstring or nullno
isMainbooleannoDefault: false.
namestringno
syncFrequencyHoursnumbernoSync frequency in hours
type"main" or "competition" or "event" or "other"noServer category type Default: "other".

Source: apps/api/openapi.json.