Scheduled Events
The Scheduled Events endpoints of the MCID API.
Create a Discord scheduled event
/api/servers/{serverId}/scheduled-eventsCreates 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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
serverId | path | string | yes | Discord server ID |
Idempotency-Key | header | string | no | Optional idempotency key (up to 128 characters). A retry with the same key returns the cached response. |
Request body (JSON, required): CreateScheduledEventDto schema.
Responses
| Status | Description | Body |
|---|---|---|
201 | Scheduled event created successfully | ScheduledEventResponseDto |
400 | Invalid input payload, time range or entity parameters | |
401 | Missing or invalid API key | |
403 | Project lacks manage_events scope on this server | |
404 | Server or channel not found | |
409 | Idempotency conflict: a request with this key is currently in progress, or the key was reused with a different payload. | |
429 | Project rate limit exceeded | |
502 | Discord rejected the request or bot lacks permissions |
Open in Swagger (opens in a new tab)
Update a Discord scheduled event
/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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
serverId | path | string | yes | Discord server ID |
eventId | path | string | yes | Discord scheduled event ID |
Idempotency-Key | header | string | no | Optional idempotency key (up to 128 characters). A retry with the same key returns the cached response. |
Request body (JSON, required): UpdateScheduledEventDto schema.
Responses
| Status | Description | Body |
|---|---|---|
200 | Scheduled event updated successfully | ScheduledEventResponseDto |
400 | Invalid update parameters or time range | |
401 | Missing or invalid API key | |
403 | Project lacks manage_events scope on this server | |
404 | Scheduled event not found or not owned by this project | |
409 | Idempotency conflict: a request with this key is currently in progress, or the key was reused with a different payload. | |
429 | Project rate limit exceeded | |
502 | Discord rejected the request or bot lacks permissions |
Open in Swagger (opens in a new tab)
Delete a Discord scheduled event
/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
| Name | In | Type | Required | Description |
|---|---|---|---|---|
serverId | path | string | yes | Discord server ID |
eventId | path | string | yes | Discord scheduled event ID |
Idempotency-Key | header | string | no | Optional idempotency key (up to 128 characters). A retry with the same key returns the cached response. |
Responses
| Status | Description | Body |
|---|---|---|
204 | Scheduled event deleted successfully | |
401 | Missing or invalid API key | |
403 | Project lacks manage_events scope on this server | |
404 | Scheduled event not found or not owned by this project | |
409 | Idempotency conflict: a request with this key is currently in progress, or the key was reused with a different payload. | |
429 | Project rate limit exceeded | |
502 | Discord rejected the request or bot lacks permissions |
Open in Swagger (opens in a new tab)
Schemas
CreateScheduledEventDto schema
| Field | Type | Required | Description |
|---|---|---|---|
channelId | string | no | Discord Voice or Stage channel ID. Exactly one of location or channelId must be provided. |
description | string | no | Description of the scheduled event (up to 1000 characters) |
endsAt | string | no | End time in ISO 8601 format (required for external events, must be after startsAt) |
location | string | no | External location name (1 to 100 characters). Exactly one of location or channelId must be provided. |
name | string | yes | Name of the scheduled event (1 to 100 characters) |
startsAt | string | yes | Start time in ISO 8601 format |
ScheduledEventResponseDto schema
| Field | Type | Required | Description |
|---|---|---|---|
channelId | string or null | no | Discord channel ID for voice/stage event |
createdAt | string | yes | Timestamp when this event was recorded in MCID |
description | string or null | no | Description of the scheduled event |
endsAt | string or null | no | End time in ISO 8601 format |
entityType | "STAGE_INSTANCE" or "VOICE" or "EXTERNAL" | yes | Entity type of the scheduled event |
id | string | yes | Discord scheduled event snowflake ID |
location | string or null | no | External location name |
name | string | yes | Name of the scheduled event |
serverId | string | yes | Discord server ID |
startsAt | string | yes | Start time in ISO 8601 format |
status | "SCHEDULED" or "ACTIVE" or "COMPLETED" or "CANCELED" | yes | Current status of the scheduled event |
UpdateScheduledEventDto schema
| Field | Type | Required | Description |
|---|---|---|---|
channelId | string | no | Updated Discord Voice or Stage channel ID |
description | string | no | Updated description of the scheduled event (up to 1000 characters) |
endsAt | string | no | Updated end time in ISO 8601 format |
location | string | no | Updated external location (1 to 100 characters) |
name | string | no | Updated name of the scheduled event (1 to 100 characters) |
startsAt | string | no | Updated start time in ISO 8601 format |
Source: apps/api/openapi.json.