Bots
Custom Discord bot API for RestoreCord: list, create, update and delete bots, start, stop or restart them, and list or leave the Discord servers they are in.
Overview
Bot endpoints manage custom Discord applications connected to RestoreCord. API-key auth can list, create, read, update, and delete owned bot records when the key has the required bot permissions.
API-key responses do not expose bot tokens or client secrets. Treat all token and secret updates as credential rotation events.
List Bots
Returns custom bots owned by the authenticated account, ordered newest first.
Auth: API key with READ_BOTS.
Return owned custom bot metadata.
GET /api/v3/botsResponse
{
"success": true,
"bots": [
{
"id": 42,
"username": "RestoreBot#0000",
"clientId": "123456789012345678",
"customDomain": "verify.example.com",
"domainStatus": "ACTIVE",
"isPresetDomain": false,
"activity": "your server",
"activityType": 10,
"createdAt": "2026-06-07T10:00:00.000Z"
}
],
"total": 1
}| Field | Type | Notes |
|---|---|---|
bots[].id | number | Internal RestoreCord bot id. |
bots[].username | string | Stored Discord bot username. |
bots[].clientId | string | Discord application id. |
bots[].customDomain | string | null | Custom verification domain when configured. discord.com means the bot uses the Discord redirect, and verify pages stay on restorecord.com. |
bots[].domainStatus | string | null | Domain status such as PENDING or ACTIVE. |
bots[].isPresetDomain | boolean | Whether the domain is a RestoreCord preset domain. |
bots[].activity | string | null | Configured bot presence text. |
bots[].activityType | number | null | Discord activity type. |
total | number | Number of returned bots. |
Create Bot
Adds a Discord bot. RestoreCord checks the bot token with Discord, rejects credentials that are already registered, and starts the bot.
Auth: API key with WRITE_BOTS.
Register a Discord application bot with RestoreCord.
POST /api/v3/botsProp
Type
| Plan | Bot limit |
|---|---|
| Free | 1 |
| Premium | 5 |
| Business / Enterprise | 50 |
Request
{
"botToken": "DISCORD_BOT_TOKEN",
"botSecret": "DISCORD_CLIENT_SECRET"
}Response
{
"success": true,
"message": "Bot created successfully.",
"bot": {
"id": 42,
"name": "RestoreBot#0000",
"clientId": "123456789012345678"
}
}Get Bot
Returns one owned bot by Discord client id. The response never includes the bot token or client secret.
Auth: API key with READ_BOTS.
Return one owned bot record.
GET /api/v3/bots/{botId}Prop
Type
Response
{
"success": true,
"bot": {
"id": 42,
"username": "RestoreBot#0000",
"clientId": "123456789012345678",
"customDomain": "verify.example.com",
"domainStatus": "ACTIVE",
"isPresetDomain": false,
"activity": "your server",
"activityType": 10,
"createdAt": "2026-06-07T10:00:00.000Z"
},
"isOwner": true
}The direct bot record endpoint is owner-only. Bots used by servers shared with the account return 404 NOT_FOUND.
Update Bot
Updates bot credentials and presence settings. If the bot token changes, RestoreCord verifies the token with Discord and restarts the bot.
Auth: API key with WRITE_BOTS.
Update credentials or presence for one owned bot.
PATCH /api/v3/bots/{botId}Prop
Type
clientId and botId are not request body fields. botId is only the required URL path value in /api/v3/bots/{botId}.
Response
{
"success": true,
"message": "Bot successfully updated.",
"bot": {
"id": 42,
"username": "RestoreBot#0000",
"clientId": "123456789012345678",
"customDomain": "verify.example.com",
"domainStatus": "ACTIVE",
"activity": "your server",
"activityType": 10
}
}| Activity value | Common Discord meaning |
|---|---|
0 | Playing |
1 | Streaming |
2 | Listening |
3 | Watching |
5 | Competing |
10 | Custom status. Used as the default. |
Delete Bot
Deletes an owned custom bot only when no RestoreCord servers still use it.
Auth: API key with WRITE_BOTS.
Delete one owned bot if it is not attached to any RestoreCord servers.
DELETE /api/v3/bots/{botId}Prop
Type
Response
{
"success": true,
"message": "Bot successfully deleted."
}If the bot is still used by servers, the route returns 409 RESOURCE_IN_USE with the server list that must be deleted or moved first.
Runtime Controls
Runtime controls start, stop, or restart a bot. The routes only accept bots owned by the API key's account.
Auth: API key with WRITE_BOTS.
| Endpoint | Purpose |
|---|---|
POST /api/v3/bots/{botId}/runtime/start | Start the bot. |
POST /api/v3/bots/{botId}/runtime/stop | Stop the bot. |
POST /api/v3/bots/{botId}/runtime/restart | Restart the bot. |
Restart bot
Restart the bot. Make sure Server Members Intent is enabled in the Developer Portal.
POST /api/v3/bots/{botId}/runtime/restartProp
Type
{
"success": true,
"message": "Bot restart requested"
}Guild Helpers
Guild helpers use the bot token to list or leave Discord servers. Owners can list all guilds; accounts with sub-user pull-member access to a server using the bot receive only accessible guilds.
Auth: API key with READ_BOTS to list guilds, or WRITE_BOTS to leave them.
List bot guilds
Return Discord guilds the bot is in, sorted by approximate member count.
GET /api/v3/bots/{botId}/guildsProp
Type
List Guilds Response
{
"success": true,
"guilds": [
{
"id": "111111111111111111",
"name": "Community",
"icon": null,
"owner": false,
"permissions": "278032280691",
"memberCount": 1200
}
],
"total": 1
}Leave guilds
Owner-only helper that asks the bot to leave up to 50 guilds.
POST /api/v3/bots/{botId}/guildsProp
Type
Leave Guilds Response
{
"success": true,
"message": "Successfully left 1 of 1 guilds",
"summary": {
"total": 1,
"successful": 1,
"failed": 0
},
"results": [
{
"guildId": "111111111111111111",
"success": true,
"message": "Successfully left guild"
}
]
}- A partial failure returns per-guild result rows.
- More than 50 ids returns
400 VALIDATION_ERRORwith the messageMaximum 50 guilds can be left at once, and the bot leaves none of them. To leave more, send the ids in batches of 50.
Status and Errors
| Status/code | When it appears |
|---|---|
200 | Successful list, get, update, or guild response. |
201 | Bot created. |
400 MISSING_FIELD | Required bot token, secret, or guild list missing. |
400 INVALID_INPUT / VALIDATION_ERROR | Invalid token format, read-only client id in an update body, invalid activity, or guild id. |
400 INVALID_CREDENTIALS | Discord rejects the bot token or the token does not match the client id. |
403 FORBIDDEN | Missing API-key permission or plan limit reached. |
404 NOT_FOUND | Bot or guild resource is not accessible. |
409 DUPLICATE_RESOURCE | Bot token, client secret, or client id is already registered. |
409 RESOURCE_IN_USE | Bot deletion blocked because RestoreCord servers still use it. |
429 RATE_LIMITED | Too many requests to RestoreCord. Wait for the Retry-After header before retrying. |
503 RATE_LIMITED | Discord is rate limiting the bot while listing its guilds. Try again in a few seconds. |
502 EXTERNAL_SERVICE_ERROR | Discord API failure. |