API Keys
Create scoped RestoreCord API keys, send them as bearer tokens, and limit each key with permission bitfields, expiration dates and IP allowlists.
Key Format
RestoreCord API keys are automation credentials in the format <keyId>.<secret>. The key ID identifies the credential and the secret authenticates the request.
Authorization: Bearer <keyId>.<secret>Store the full key only once when it is created. Rotate the key if it appears in logs, screenshots, repositories, browser code, or Discord messages.
Create and Manage Keys
API keys are created and managed in the RestoreCord dashboard. API credentials are for server-side integrations that call documented customer API endpoints.
| Setting | Purpose |
|---|---|
| Name | Use a unique name that identifies the integration or job. |
| Expiration | Choose the shortest useful lifetime for the integration. |
| Permissions | Grant only the endpoint groups the integration needs. |
| IP allowlist | Restrict access to fixed infrastructure when possible. |
Authentication
- Send the key in the
Authorizationheader. - Use the
Bearerprefix for consistency with the rest of the v3 API. - Use API keys from server-side code only; never ship them in browser bundles or public clients.
- Expired, revoked, inactive, or IP-blocked keys are rejected.
Permissions
Permissions are a bitfield and are selected by name in the dashboard. Grant the smallest set your integration needs.
Permission Sets
| Permission | Value | Allows |
|---|---|---|
READ_ACCOUNT | 1 | Read basic account information. |
READ_SERVERS | 2 | List and inspect RestoreCord servers. |
READ_MEMBERS | 4 | Read member records and member status. |
READ_BOTS | 8 | Read bot metadata. Tokens and client secrets are hidden. |
READ_ANALYTICS | 16 | Read analytics data. |
WRITE_SERVERS | 256 | Create, update, and delete server settings. |
WRITE_MEMBERS | 512 | Modify member records. |
WRITE_BOTS | 1024 | Create, update, and delete custom bot records. |
CREATE_BACKUPS | 65536 | Create snapshots and run snapshot migration operations. |
RESTORE_BACKUPS | 131072 | List, inspect, delete, and restore snapshots. |
SERVER_PULL | 1048576 | Pull authorized members into a Discord server. |
SERVER_FIREWALL | 4194304 | Manage firewall rules, passwords, bypasses, logs, and imports. |
READ_ACCOUNT is the safe baseline for most integrations. Add write, pull, backup, or firewall permissions only for jobs that need them.
Endpoint Access
Use the dedicated API reference pages for full request and response fields. This table maps API-key permissions to the major endpoint groups.
| Endpoint group | Common endpoints | Permission |
|---|---|---|
| Account | GET /api/v3/users | READ_ACCOUNT |
| Servers | GET /api/v3/servers, GET /api/v3/servers/{serverId} | READ_SERVERS |
| Migration status | GET /api/v3/servers/status, GET /api/v3/servers/{serverId}/migrations, GET /api/v3/servers/{serverId}/migrations/status, GET /api/v3/servers/{serverId}/migrations/estimate | READ_SERVERS |
| Migration control | POST, DELETE, PATCH /api/v3/servers/{serverId}/migrations | SERVER_PULL |
| Server writes | POST /api/v3/servers, PATCH /api/v3/servers/{serverId}, DELETE /api/v3/servers/{serverId} | WRITE_SERVERS |
| Verification links | GET, POST /api/v3/servers/{serverId}/verification-links, DELETE /api/v3/servers/{serverId}/verification-links/{linkId} | READ_SERVERS for GET, WRITE_SERVERS for POST and DELETE |
| Members | GET /api/v3/servers/{serverId}/members, GET /api/v3/members/{userId}, GET /api/v3/members/{userId}/guilds | READ_MEMBERS |
| Member pull | PUT /api/v3/servers/{serverId}/members/{userId} | SERVER_PULL |
| Bots | GET /api/v3/bots, POST /api/v3/bots, PATCH /api/v3/bots/{botId}, DELETE /api/v3/bots/{botId}, GET, POST /api/v3/bots/{botId}/guilds | READ_BOTS or WRITE_BOTS |
| Snapshots | GET /api/v3/snapshots, POST /api/v3/servers/{serverId}/snapshots, POST /api/v3/snapshots/{snapshotId}/restore | CREATE_BACKUPS or RESTORE_BACKUPS |
| Firewall | /api/v3/servers/{serverId}/firewall/* | SERVER_FIREWALL |
| Analytics | /api/v3/servers/analytics, /api/v3/servers/firewall/analytics | READ_ANALYTICS |
| Webhook events | PATCH /api/v3/servers/{serverId} with webhookUrl | WRITE_SERVERS plus Enterprise plan |
Some actions only work from the dashboard, whatever permissions a key has. These include server ownership, sub-users and their invites, plans, checkout, coupons and trials, notifications, webhook secret generation, snapshot previews, migration logs and share links, OAuth checks, and member imports. API keys get 403 with This action requires a full session.
IP Allowlists
Restrict keys to fixed infrastructure when possible. Allowlist entries can be exact IP addresses or CIDR ranges.
203.0.113.10
198.51.100.0/24
2001:db8::/32Safe Usage
Use one key per integration
Separate keys make it clear which system performed an action and let you revoke one integration without breaking others.
Keep destructive access isolated
Put WRITE_MEMBERS, WRITE_BOTS, SERVER_PULL, and backup restore permissions on dedicated keys, not read-only dashboard/reporting keys.
Handle API failure states
Automation should explicitly handle 401, 403, and 429 responses.