API Reference

Migrations

Migration API for RestoreCord: estimate, start, stop, pause and resume bulk Discord member pulls, and check migration status and history for your servers.

Overview

Migration endpoints expose active and historical member migration state, estimate eligible pull counts, and control member migration runs. The all-server status endpoint covers servers owned by the API key's account; server-scoped endpoints also work on servers shared with that account through the pull_members sub-user permission.

EndpointAuthPurpose
GET /api/v3/servers/statusAPI key with READ_SERVERSActive migrations by default, or paginated migration history with history=true.
GET /api/v3/servers/{serverId}/migrationsAPI key with READ_SERVERS; the key's account must own the server or have pull_membersLatest migration row for one server. Business or Enterprise server owner.
GET /api/v3/servers/{serverId}/migrations/statusAPI key with READ_SERVERS; the key's account must own the server or have pull_membersDetailed latest migration progress for one server. Business or Enterprise server owner.
GET /api/v3/servers/{serverId}/migrations/estimateAPI key with READ_SERVERS; the key's account must own the server or have pull_membersEstimated eligible member count before starting a migration.
POST /api/v3/servers/{serverId}/migrationsAPI key with SERVER_PULL; the key's account must own the server or have pull_membersStart or queue a member migration.
DELETE /api/v3/servers/{serverId}/migrationsAPI key with SERVER_PULL; the key's account must own the server or have pull_membersStop active migrations, or pause them with action=pause.
PATCH /api/v3/servers/{serverId}/migrationsAPI key with SERVER_PULL; the key's account must own the server or have pull_membersResume one paused migration.

Migration performance analytics remain documented on the Analytics page under GET /api/v3/servers/migrations/stats.

Starting, stopping, pausing and resuming migrations needs SERVER_PULL. Reading migrations and estimates only needs READ_SERVERS, so keep SERVER_PULL on keys meant for member-pull automation.

Member pulls have no RestoreCord-imposed cooldown on any plan, including Free. Queued migrations wait for preceding work, without an additional cooldown. Discord rate limits, scheduled starts, and configured member or batch delays still apply.

For a step-by-step walkthrough, see Automate Pulls with the API. For what each option does in practice, see Pull Settings.

Migration Status

Return active migrations by default, or historical migrations with pagination when history=true. Migrations that finished within the last 10 minutes are still returned as active so their final result stays visible.

Returns active migration rows or paginated history for servers owned by the API key's account.

GET /api/v3/servers/status

Prop

Type

Auth: API key with READ_SERVERS.

{
  "success": true,
  "migrations": [
    {
      "id": 77,
      "serverId": "42",
      "guildId": "111111111111111111",
      "sourceServerId": "42",
      "sourceGuildId": "111111111111111111",
      "targetGuildId": "222222222222222222",
      "serverName": "Community",
      "targetServerName": "New Community",
      "status": "PULLING",
      "success": 120,
      "attempted": 140,
      "total": 500,
      "failed": 2,
      "invalid": 18,
      "createdAt": "2026-06-07T10:30:00.000Z"
    }
  ],
  "total": 1
}

Server Migration Status

Return the latest migration row for one internal RestoreCord server id. The detailed status route includes an isActive flag and nested progress/count objects. Both routes require the server owner to be on Business or Enterprise; otherwise they return 403. When the server has no migrations, they return 404.

Get latest server migration

Returns the most recent migration for one server.

GET /api/v3/servers/{serverId}/migrations

Prop

Type

Get detailed migration status

Returns progress and active-state details for the latest migration.

GET /api/v3/servers/{serverId}/migrations/status

Prop

Type

{
  "success": true,
  "migration": {
    "id": 77,
    "guildId": "111111111111111111",
    "migrationGuildId": "222222222222222222",
    "status": "PULLING",
    "isActive": true,
    "progress": {
      "total": 500,
      "attempted": 140,
      "percentage": 28
    },
    "counts": {
      "success": 120,
      "banned": 0,
      "maxGuilds": 0,
      "invalid": 18,
      "failed": 2,
      "blacklisted": 0,
      "inServer": 0
    },
    "timestamps": {
      "created": "2026-06-07T10:30:00.000Z",
      "updated": "2026-06-07T10:40:00.000Z"
    }
  }
}

Estimate Migration

Estimate how many authorized members are eligible before starting a migration. Query filters mirror the start route's country and quality filters, with the same plan gates. count is the eligible member count after filters and firewall blocks; total is every member who still authorizes the bot. Members already in the target guild are included in count. Rate limit: 15 requests per minute.

Returns eligible and total member counts for one server.

GET /api/v3/servers/{serverId}/migrations/estimate

Prop

Type

{
  "success": true,
  "count": 500,
  "total": 620
}

Start Migration

Start or queue a member migration from one RestoreCord source server into a target Discord guild. The route validates the target guild, bot token, selected roles, member eligibility, queue state, and Discord invite status before starting, including that the bot can assign each selected role in the target guild. Rate limit: 5 starts per minute.

  • Queueing: the migration is queued (migration.queued: true) when another migration for the same server is pending or pulling.
  • Plan gates: countryCode needs a Business or Enterprise owner. maxChurnRate and minDaysSinceLeft need Business or Enterprise; minRetentionDays and maxActivityInterval need Enterprise. nickname, startTime, and leaveServer need Premium or higher; memberPerGroup and delayBetweenGroups need Enterprise. Options your plan doesn't include have no effect.
  • Delays: when delayMin equals delayMax, the fixed delay is used on every plan. A range needs a Premium or higher owner. Without a delay, RestoreCord uses a safe default within Discord's rate limits. With a range, each member waits between the minimum and maximum.

Starts or queues a member migration.

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

Prop

Type

{
  "targetGuildId": "222222222222222222",
  "selectedRoles": ["333333333333333333"],
  "customPullCount": 250,
  "delayMin": 700,
  "delayMax": 1200,
  "leaveServer": false,
  "includeUnknownMembers": true
}

Returns 201:

{
  "success": true,
  "message": "Started Pull Process, this will take around 4 minutes",
  "migration": {
    "totalMembers": 250,
    "estimatedTime": "4 minutes",
    "queued": false,
    "targetMembersUnavailable": false
  }
}

When queued, message is "Migration queued. It will start after the current migration completes." When targetMembersUnavailable is true, the bot can't read the target guild's members (Server Members Intent is off), so members already in the guild can't be skipped up front, and the message ends with a note about enabling Server Members Intent.

Stop or Pause Migration

Stop active migrations for a server, or pause them with action=pause. Pause applies to pending, waiting and pulling migrations; stop also applies to paused ones. When migrationId is omitted, the update applies to all matching migrations for that server. A stopped migration can't be resumed.

Stops active server migrations or pauses them with action=pause.

DELETE /api/v3/servers/{serverId}/migrations

Prop

Type

{
  "success": true,
  "message": "Migration stopped successfully."
}
{
  "success": true,
  "message": "Migration paused successfully."
}

Resume Migration

Resume one paused migration. Returns 409 with "Only paused migrations can be resumed." or "Stopped migrations cannot be resumed." otherwise. Rate limit: 5 requests per minute.

Resumes one paused migration.

PATCH /api/v3/servers/{serverId}/migrations

Prop

Type

{
  "success": true,
  "message": "Migration resumed successfully."
}

Response Fields

FieldTypeNotes
migrations[].idnumberInternal migration row id.
migrations[].serverIdstringInternal RestoreCord source server id in the status response.
migrations[].guildIdstringSource server Discord guild id.
migrations[].sourceServerIdstringInternal RestoreCord source server id.
migrations[].sourceGuildIdstringSource server Discord guild id.
migrations[].targetGuildIdstringTarget migration Discord guild id.
migrations[].serverNamestringRestoreCord server name when available.
migrations[].targetServerNamestring | nullTarget Discord guild name when available.
migrations[].statusstringMigration state such as WAITING, PENDING, PULLING, SUCCESS, FAILED, STOPPED, or PAUSED.
migrations[].successnumberMembers successfully migrated.
migrations[].attemptednumberAttempted member operations.
migrations[].totalnumberTotal planned member count when known.
migrations[].queuearray | undefinedActive queue preview, present only for PULLING rows from the all-server status endpoint.
paginationobject | undefinedPresent in history mode with page, pageSize, total, and maxPages.
migration.queuedboolean | undefinedStart response flag indicating whether the new migration was queued.
migration.targetMembersUnavailableboolean | undefinedStart response flag; true when the bot can't read the target guild's members.

Status and Errors

Status/codeWhen it appears
200Migration status/history, estimate, stop, pause, or resume returned.
201Migration start request accepted.
400 INVALID_INPUT / VALIDATION_ERRORInvalid pagination, sort, search, server id, target guild id, role id, body field, or Discord invite-disabled state.
401 UNAUTHORIZED / INVALID_CREDENTIALSMissing auth, invalid auth, or invalid bot token.
403 FORBIDDEN / INSUFFICIENT_PERMISSIONSAPI key lacks READ_SERVERS for status, latest-migration or estimate reads, or SERVER_PULL for start, stop, pause or resume, the key's account has no pull access to the server, the owner isn't on Business or Enterprise for the latest-migration routes, or the bot lacks target-server access/role permissions.
409 CONFLICTAnother start for the same server is in progress, or the migration to resume isn't paused.
404 NOT_FOUNDServer, bot, migration, target guild, or eligible members not found.
429 RATE_LIMITEDAll-server status (30/min), start (5/min), resume (5/min) or estimate (15/min) rate limit reached, or Discord is rate limiting the target-member check. Wait for Retry-After.
502 EXTERNAL_SERVICE_ERROR / 503 SERVICE_UNAVAILABLEMigration service unavailable or returned an unsuccessful response.
500 INTERNAL_SERVER_ERRORUnexpected error. Retry later.

Every start error message, with its cause and fix, is listed in Results and Troubleshooting.

On this page