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.
| Endpoint | Auth | Purpose |
|---|---|---|
GET /api/v3/servers/status | API key with READ_SERVERS | Active migrations by default, or paginated migration history with history=true. |
GET /api/v3/servers/{serverId}/migrations | API key with READ_SERVERS; the key's account must own the server or have pull_members | Latest migration row for one server. Business or Enterprise server owner. |
GET /api/v3/servers/{serverId}/migrations/status | API key with READ_SERVERS; the key's account must own the server or have pull_members | Detailed latest migration progress for one server. Business or Enterprise server owner. |
GET /api/v3/servers/{serverId}/migrations/estimate | API key with READ_SERVERS; the key's account must own the server or have pull_members | Estimated eligible member count before starting a migration. |
POST /api/v3/servers/{serverId}/migrations | API key with SERVER_PULL; the key's account must own the server or have pull_members | Start or queue a member migration. |
DELETE /api/v3/servers/{serverId}/migrations | API key with SERVER_PULL; the key's account must own the server or have pull_members | Stop active migrations, or pause them with action=pause. |
PATCH /api/v3/servers/{serverId}/migrations | API key with SERVER_PULL; the key's account must own the server or have pull_members | Resume 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/statusProp
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}/migrationsProp
Type
Get detailed migration status
Returns progress and active-state details for the latest migration.
GET /api/v3/servers/{serverId}/migrations/statusProp
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/estimateProp
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:
countryCodeneeds a Business or Enterprise owner.maxChurnRateandminDaysSinceLeftneed Business or Enterprise;minRetentionDaysandmaxActivityIntervalneed Enterprise.nickname,startTime, andleaveServerneed Premium or higher;memberPerGroupanddelayBetweenGroupsneed Enterprise. Options your plan doesn't include have no effect. - Delays: when
delayMinequalsdelayMax, 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}/migrationsProp
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}/migrationsProp
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}/migrationsProp
Type
{
"success": true,
"message": "Migration resumed successfully."
}Response Fields
| Field | Type | Notes |
|---|---|---|
migrations[].id | number | Internal migration row id. |
migrations[].serverId | string | Internal RestoreCord source server id in the status response. |
migrations[].guildId | string | Source server Discord guild id. |
migrations[].sourceServerId | string | Internal RestoreCord source server id. |
migrations[].sourceGuildId | string | Source server Discord guild id. |
migrations[].targetGuildId | string | Target migration Discord guild id. |
migrations[].serverName | string | RestoreCord server name when available. |
migrations[].targetServerName | string | null | Target Discord guild name when available. |
migrations[].status | string | Migration state such as WAITING, PENDING, PULLING, SUCCESS, FAILED, STOPPED, or PAUSED. |
migrations[].success | number | Members successfully migrated. |
migrations[].attempted | number | Attempted member operations. |
migrations[].total | number | Total planned member count when known. |
migrations[].queue | array | undefined | Active queue preview, present only for PULLING rows from the all-server status endpoint. |
pagination | object | undefined | Present in history mode with page, pageSize, total, and maxPages. |
migration.queued | boolean | undefined | Start response flag indicating whether the new migration was queued. |
migration.targetMembersUnavailable | boolean | undefined | Start response flag; true when the bot can't read the target guild's members. |
Status and Errors
| Status/code | When it appears |
|---|---|
200 | Migration status/history, estimate, stop, pause, or resume returned. |
201 | Migration start request accepted. |
400 INVALID_INPUT / VALIDATION_ERROR | Invalid pagination, sort, search, server id, target guild id, role id, body field, or Discord invite-disabled state. |
401 UNAUTHORIZED / INVALID_CREDENTIALS | Missing auth, invalid auth, or invalid bot token. |
403 FORBIDDEN / INSUFFICIENT_PERMISSIONS | API 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 CONFLICT | Another start for the same server is in progress, or the migration to resume isn't paused. |
404 NOT_FOUND | Server, bot, migration, target guild, or eligible members not found. |
429 RATE_LIMITED | All-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_UNAVAILABLE | Migration service unavailable or returned an unsuccessful response. |
500 INTERNAL_SERVER_ERROR | Unexpected error. Retry later. |
Every start error message, with its cause and fix, is listed in Results and Troubleshooting.