Bot API Reference
The Bot API provides direct, low-latency access to manage servers, fetch members, and interact with text channels. This is the core interface for building powerful server automations.
Base API Endpoint
https://modvc.org/api/botAuthentication & Security
All requests require an Authorization header containing your bot's secret token. This token grants administrative privileges based on the roles assigned to your bot in the server.
Rate Limits
To prevent abuse and ensure stability for all bots, the ModVC API enforces rate limits. A standard Token Bucket algorithm is used.
- Limit: 60 requests per minute per bot token.
- Response: Exceeding this limit will result in a
429 Too Many RequestsHTTP status code. - Header: The response will include a
Retry-Afterheader indicating the number of seconds until your limit resets.
Endpoint Dictionary
/?serverId={id}&type=membersRetrieves a comprehensive list of all members currently residing in the server, including their assigned roles and join dates.
Response Shape
/ (action: get_messages)Retrieves a list of recent messages from a specific text channel. Requires the bot to have the READ_MESSAGES permission in the server.
Request Body Payload
Response Shape
/ (action: create_message)Sends a message to a specific text channel. Supports rich text embeds and interactive UI components (like Buttons) that trigger Webhooks.
Request Body Payload
/ (action: delete_message)Deletes a specific message. If the bot is deleting another user's message, it must have the MANAGE_MESSAGES permission.
Request Body Payload
/ (action: add_reaction)Adds an emoji reaction to a specific message. Requires the ADD_REACTIONS permission.
Request Body Payload
/ (action: delete_channel)Permanently deletes a channel from the server. This is often used by Ticket Bots to cleanly close resolved support tickets.
MANAGE_CHANNELS permission role in the server to execute this action.Request Body Payload
/ (action: list_emojis)Retrieves a list of all custom emojis registered under the specified server.
Request Body Payload
Response Shape
/ (action: upload_emoji)Uploads a new custom emoji to the server. The image payload can be an HTTP/HTTPS image URL or a base64 string (including base64 data URLs).
MANAGE_EMOJIS permission.- Max emoji size is 256KB.
- Max 50 custom emojis per server.
Request Body Payload
Response Shape
/ (action: delete_emoji)Permanently deletes a custom emoji from the server.
MANAGE_EMOJIS permission role in the server.Request Body Payload
/ (action: presence)Sends a heartbeat to the Edge Presence API to mark the bot as "Online". Bots must ping this endpoint every 15-30 seconds to maintain a green online status dot in the UI.