API Reference

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/bots

Response

{
  "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
}
FieldTypeNotes
bots[].idnumberInternal RestoreCord bot id.
bots[].usernamestringStored Discord bot username.
bots[].clientIdstringDiscord application id.
bots[].customDomainstring | nullCustom verification domain when configured. discord.com means the bot uses the Discord redirect, and verify pages stay on restorecord.com.
bots[].domainStatusstring | nullDomain status such as PENDING or ACTIVE.
bots[].isPresetDomainbooleanWhether the domain is a RestoreCord preset domain.
bots[].activitystring | nullConfigured bot presence text.
bots[].activityTypenumber | nullDiscord activity type.
totalnumberNumber 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/bots

Prop

Type

PlanBot limit
Free1
Premium5
Business / Enterprise50

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 valueCommon Discord meaning
0Playing
1Streaming
2Listening
3Watching
5Competing
10Custom 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.

EndpointPurpose
POST /api/v3/bots/{botId}/runtime/startStart the bot.
POST /api/v3/bots/{botId}/runtime/stopStop the bot.
POST /api/v3/bots/{botId}/runtime/restartRestart the bot.

Restart bot

Restart the bot. Make sure Server Members Intent is enabled in the Developer Portal.

POST /api/v3/bots/{botId}/runtime/restart

Prop

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}/guilds

Prop

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}/guilds

Prop

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_ERROR with the message Maximum 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/codeWhen it appears
200Successful list, get, update, or guild response.
201Bot created.
400 MISSING_FIELDRequired bot token, secret, or guild list missing.
400 INVALID_INPUT / VALIDATION_ERRORInvalid token format, read-only client id in an update body, invalid activity, or guild id.
400 INVALID_CREDENTIALSDiscord rejects the bot token or the token does not match the client id.
403 FORBIDDENMissing API-key permission or plan limit reached.
404 NOT_FOUNDBot or guild resource is not accessible.
409 DUPLICATE_RESOURCEBot token, client secret, or client id is already registered.
409 RESOURCE_IN_USEBot deletion blocked because RestoreCord servers still use it.
429 RATE_LIMITEDToo many requests to RestoreCord. Wait for the Retry-After header before retrying.
503 RATE_LIMITEDDiscord is rate limiting the bot while listing its guilds. Try again in a few seconds.
502 EXTERNAL_SERVICE_ERRORDiscord API failure.

On this page