API Reference

Snapshots

Backup API for RestoreCord: create, list, update, delete and restore Discord server snapshots, and manage pending role restores after a restore.

Overview

Snapshots are Discord server backups. Creation requires an API key with CREATE_BACKUPS and restore/delete operations generally require RESTORE_BACKUPS. Besides snapshots owned by the API key's account, the key can reach snapshots of servers shared with that account through the create_snapshot or manage_snapshots sub-user permissions, where the route allows it.

EndpointPurposePermission
POST /api/v3/servers/{serverId}/snapshotsStart snapshot creationCREATE_BACKUPS
GET /api/v3/snapshotsList accessible snapshotsRESTORE_BACKUPS
GET|PATCH|DELETE /api/v3/snapshots/{snapshotId}Read/update/delete snapshot metadataRESTORE_BACKUPS for GET/DELETE, CREATE_BACKUPS for PATCH
POST /api/v3/snapshots/{snapshotId}/restoreStart restoreRESTORE_BACKUPS
POST /api/v3/snapshots/{snapshotId}/migrateMigrate legacy v0 snapshotCREATE_BACKUPS

| DELETE /api/v3/snapshots/pending-roles/{guildId} and POST /api/v3/snapshots/pending-roles/{guildId}/restore | Manage pending role restoration | RESTORE_BACKUPS |

Snapshot create, restore, and migrate are asynchronous. A successful API response means the job was started, not that the backup or restore has finished.

Create Snapshot

Start a snapshot job for one server. The server owner's per-server snapshot limit and plan-based attachment and message limits apply.

Starts an asynchronous snapshot job.

POST /api/v3/servers/{serverId}/snapshots

Prop

Type

{
  "snapshotName": "Before launch",
  "snapshotDescription": "Pre-launch backup",
  "attachmentMode": 1,
  "enableEmojiBackup": true,
  "messageCount": 250,
  "excludedChannels": ["333333333333333333"]
}
{
  "success": true,
  "message": "Snapshot creation started successfully.",
  "snapshotId": "snap_abc123"
}

List Snapshots

List snapshots owned by the API key's account plus snapshots from shared servers where that account has snapshot permissions.

Returns accessible snapshot metadata.

GET /api/v3/snapshots
{
  "success": true,
  "snapshots": [
    {
      "id": 5,
      "snapshotId": "snap_abc123",
      "snapshotName": "Before launch",
      "snapshotDescription": "Pre-launch backup",
      "sourceGuildId": "123456789012345678",
      "totalChannels": 32,
      "totalRoles": 18,
      "totalMembers": 1200,
      "totalMessages": 5000,
      "totalAttachments": 100,
      "totalEmojis": 25,
      "pinned": false,
      "version": 1,
      "createdAt": "2026-06-07T10:30:00.000Z",
      "updatedAt": "2026-06-07T10:30:00.000Z",
      "isOwner": true,
      "canManage": true
    }
  ],
  "total": 1,
  "subscription": {
    "role": "business",
    "canCreateSnapshots": true
  }
}

Snapshot Details

Get snapshot

Returns one snapshot's metadata.

GET /api/v3/snapshots/{snapshotId}

Prop

Type

Update snapshot

Update snapshot name, description, or pinned state.

PATCH /api/v3/snapshots/{snapshotId}

Prop

Type

Delete snapshot

Delete a snapshot and its stored data.

DELETE /api/v3/snapshots/{snapshotId}

Prop

Type

The delete route rejects legacy v0 snapshots until they are migrated to the latest format.

Restore Snapshot

Start a restore job into a target Discord server. The caller can provide either an owned bot token or the botId of a bot the account can use.

Starts an asynchronous snapshot restore job.

POST /api/v3/snapshots/{snapshotId}/restore

Prop

Type

{
  "guildId": "222222222222222222",
  "botId": "555555555555555555",
  "restoreMessageCount": 250,
  "clearServer": false
}
{
  "success": true,
  "message": "Snapshot restoration started successfully.",
  "data": {
    "success": true,
    "jobId": "restore_abc123"
  }
}

Restore Error Mapping

CauseAPI error
The bot lacks Administrator, isn't in the target server, or access is denied403 INSUFFICIENT_PERMISSIONS
Target server not found404 NOT_FOUND
The bot token is invalid or isn't a bot token401 INVALID_CREDENTIALS
Any other restore failure502 EXTERNAL_SERVICE_ERROR

Migrate Snapshot

Start a migration for an older v0 snapshot. The migrated snapshot remains attributed to the snapshot/server owner.

Starts a v0-to-current snapshot migration job.

POST /api/v3/snapshots/{snapshotId}/migrate

Prop

Type

{
  "success": true,
  "message": "Snapshot migration started successfully."
}

Pending Role Restore

Pending role restore endpoints manage role-restoration data saved during snapshot restore flows.

Delete pending role restore

Cancel and delete pending role restoration data for a target guild/snapshot.

DELETE /api/v3/snapshots/pending-roles/{guildId}

Prop

Type

Start pending role restore

Begin restoring roles from previously saved pending data.

POST /api/v3/snapshots/pending-roles/{guildId}/restore

Prop

Type

  • The bot in pending data must still be in the target server.
  • Only one role restore should run at a time for a server.
  • The endpoints require snapshot restore/manage access.

Status and Errors

Status/codeWhen it appears
200Successful list, read, update, delete, restore start, migration start, or role-restore action.
201Snapshot creation started.
400 INVALID_INPUT / VALIDATION_ERRORMissing snapshot id, invalid server id, invalid body, latest-version migration attempt, or v0 delete attempt.
401 INVALID_CREDENTIALSInvalid bot token.
403 INSUFFICIENT_PERMISSIONS / RESOURCE_LIMIT_EXCEEDEDMissing API key permission, missing server access, bot lacks access/admin, or snapshot limit reached.
404 NOT_FOUNDSnapshot, server, or bot not found.
409 RESOURCE_IN_USEAnother snapshot creation is already in progress.
429 RATE_LIMITEDSnapshot or restore rate limit reached.
502 EXTERNAL_SERVICE_ERROR / 503 SERVICE_UNAVAILABLESnapshot, restore, or migration service unavailable or returned an unexpected error.

On this page