API referenceProject API

Scheduled Events

The Scheduled Events endpoints of the MCID API.

Create a Discord scheduled event

POST/api/servers/{serverId}/scheduled-events

Creates a scheduled event in the Discord server (external location or channel) and records project ownership. Retrying with the same Idempotency-Key header returns the cached response without creating a duplicate event on Discord.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
Idempotency-KeyheaderstringnoOptional idempotency key (up to 128 characters). A retry with the same key returns the cached response.

Request body (JSON, required): CreateScheduledEventDto schema.

Responses

StatusDescriptionBody
201Scheduled event created successfullyScheduledEventResponseDto
400Invalid input payload, time range or entity parameters
401Missing or invalid API key
403Project lacks manage_events scope on this server
404Server or channel not found
409Idempotency conflict: a request with this key is currently in progress, or the key was reused with a different payload.
429Project rate limit exceeded
502Discord rejected the request or bot lacks permissions

Open in Swagger (opens in a new tab)

Update a Discord scheduled event

PATCH/api/servers/{serverId}/scheduled-events/{eventId}

Updates a scheduled event on Discord. Projects can only update scheduled events they previously created; attempts to update an event created by another project or created manually on Discord will return 404.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
eventIdpathstringyesDiscord scheduled event ID
Idempotency-KeyheaderstringnoOptional idempotency key (up to 128 characters). A retry with the same key returns the cached response.

Request body (JSON, required): UpdateScheduledEventDto schema.

Responses

StatusDescriptionBody
200Scheduled event updated successfullyScheduledEventResponseDto
400Invalid update parameters or time range
401Missing or invalid API key
403Project lacks manage_events scope on this server
404Scheduled event not found or not owned by this project
409Idempotency conflict: a request with this key is currently in progress, or the key was reused with a different payload.
429Project rate limit exceeded
502Discord rejected the request or bot lacks permissions

Open in Swagger (opens in a new tab)

Delete a Discord scheduled event

DELETE/api/servers/{serverId}/scheduled-events/{eventId}

Cancels and deletes a scheduled event from Discord and removes its MCID ownership record. Projects can only delete scheduled events they previously created; other events return 404.

Authentication: Project API key (X-API-Key header)

Parameters

NameInTypeRequiredDescription
serverIdpathstringyesDiscord server ID
eventIdpathstringyesDiscord scheduled event ID
Idempotency-KeyheaderstringnoOptional idempotency key (up to 128 characters). A retry with the same key returns the cached response.

Responses

StatusDescriptionBody
204Scheduled event deleted successfully
401Missing or invalid API key
403Project lacks manage_events scope on this server
404Scheduled event not found or not owned by this project
409Idempotency conflict: a request with this key is currently in progress, or the key was reused with a different payload.
429Project rate limit exceeded
502Discord rejected the request or bot lacks permissions

Open in Swagger (opens in a new tab)

Schemas

CreateScheduledEventDto schema

FieldTypeRequiredDescription
channelIdstringnoDiscord Voice or Stage channel ID. Exactly one of location or channelId must be provided.
descriptionstringnoDescription of the scheduled event (up to 1000 characters)
endsAtstringnoEnd time in ISO 8601 format (required for external events, must be after startsAt)
locationstringnoExternal location name (1 to 100 characters). Exactly one of location or channelId must be provided.
namestringyesName of the scheduled event (1 to 100 characters)
startsAtstringyesStart time in ISO 8601 format

ScheduledEventResponseDto schema

FieldTypeRequiredDescription
channelIdstring or nullnoDiscord channel ID for voice/stage event
createdAtstringyesTimestamp when this event was recorded in MCID
descriptionstring or nullnoDescription of the scheduled event
endsAtstring or nullnoEnd time in ISO 8601 format
entityType"STAGE_INSTANCE" or "VOICE" or "EXTERNAL"yesEntity type of the scheduled event
idstringyesDiscord scheduled event snowflake ID
locationstring or nullnoExternal location name
namestringyesName of the scheduled event
serverIdstringyesDiscord server ID
startsAtstringyesStart time in ISO 8601 format
status"SCHEDULED" or "ACTIVE" or "COMPLETED" or "CANCELED"yesCurrent status of the scheduled event

UpdateScheduledEventDto schema

FieldTypeRequiredDescription
channelIdstringnoUpdated Discord Voice or Stage channel ID
descriptionstringnoUpdated description of the scheduled event (up to 1000 characters)
endsAtstringnoUpdated end time in ISO 8601 format
locationstringnoUpdated external location (1 to 100 characters)
namestringnoUpdated name of the scheduled event (1 to 100 characters)
startsAtstringnoUpdated start time in ISO 8601 format

Source: apps/api/openapi.json.

On this page