api
REST API
Programmatic access to your Restore Hub account, servers, members, backups, pulls, firewall, whitelist, blacklist, analytics, marketplace, and more. Full endpoint reference with request/response examples.
Overview
The Restore Hub REST API gives you programmatic access to all platform features. Use it to build custom dashboards, integrate with other tools, automate workflows, or create your own frontend.
The API base URL is https://restorehub.net/api/v1. All endpoints require authentication and are rate-limited per plan.
Authentication
All API requests must include your API key in the Authorization header as a Bearer token. Your API key is a UUID generated when your account is created. You can find it in the dashboard under Settings → API Key.
Authorization: Bearer rh_your_api_key_here
Tip: Your API key has the same permissions as your account. Anyone with your API key can perform any action you can. Keep it secret and never expose it in client-side code or public repositories.
Rate Limits
API requests are rate-limited per 10-second window. The limit depends on your plan. When you exceed the limit, the API returns HTTP 429 Too Many Requests.
Rate limit information is included in every response via headers:
| Plan | Requests per 10 seconds |
|---|---|
| Free | 20 |
| Premium | 50 |
| Business | 100 |
| Enterprise | 200 |
X-RateLimit-Limit: 50
X-RateLimit-Remaining: 47
X-RateLimit-Reset: 1680000010
Response Format
All successful responses are JSON with a data field. Paginated endpoints also include a pagination object. Error responses include an error string and optionally a details object for validation errors.
// Success
{
"data": { ... },
"pagination": {
"page": 1,
"limit": 25,
"total": 142,
"totalPages": 6
}
}
// Error
{
"error": "Server not found"
}
// Validation Error
{
"error": "Validation failed",
"details": {
"fieldErrors": { "roleId": ["Invalid Discord snowflake"] },
"formErrors": []
}
}
Account
Retrieve your account information, plan details, subscription status, and current limits.
GET /api/v1/account
Response:
{
"data": {
"id": "uuid",
"discordId": "123456789012345678",
"username": "johndoe",
"displayName": "John Doe",
"avatar": "https://cdn.discordapp.com/...",
"plan": "PREMIUM",
"mfaEnabled": true,
"createdAt": "2024-01-15T00:00:00Z",
"_count": {
"servers": 3,
"customBots": 2,
"teams": 1
},
"subscription": {
"plan": "PREMIUM",
"status": "ACTIVE",
"currentPeriodEnd": "2025-02-15T00:00:00Z",
"isTrial": false,
"trialEndsAt": null,
"cancelledAt": null
},
"limits": {
"maxServers": 10,
"maxBots": 5,
"maxBackups": 10,
"maxStorageBytes": 5368709120,
"pullCooldownMs": 3600000,
"marketplaceFeePercent": 12,
"apiRatePerTenSeconds": 50,
"hasVpnDetection": true,
"hasAltDetection": true,
"hasFirewall": true
}
}
}
Custom Bots
List your custom bots or create a new one. Bot tokens and client secrets are encrypted at rest and never returned in API responses.
GET /api/v1/bots
Response:
{
"data": [
{
"id": "uuid",
"clientId": "123456789012345678",
"name": "My Verify Bot",
"avatar": "https://cdn.discordapp.com/...",
"status": "ONLINE",
"activityType": "WATCHING",
"activityText": "restorehub.net",
"isActive": true,
"createdAt": "2024-01-15T00:00:00Z",
"updatedAt": "2024-06-01T00:00:00Z"
}
]
}
---
POST /api/v1/bots
Request body:
{
"botToken": "MTIz...",
"clientId": "123456789012345678",
"clientSecret": "abc123...",
"publicKey": "def456...",
"redirectUri": "https://restorehub.net/api/callback",
"name": "My Verify Bot"
}
Response (201):
{
"data": {
"id": "uuid",
"clientId": "123456789012345678",
"name": "My Verify Bot",
"isActive": true,
"createdAt": "2024-01-15T00:00:00Z"
}
}
Servers — List & Create
List all servers on your account (paginated) or create a new server.
GET /api/v1/servers?page=1&limit=25
Response:
{
"data": [
{
"id": "uuid",
"discordGuildId": "123456789012345678",
"name": "My Community",
"icon": "https://cdn.discordapp.com/...",
"memberCount": 5420,
"verifiedRoleId": "987654321098765432",
"logChannelId": "111222333444555666",
"captchaType": "TURNSTILE",
"vpnBlockEnabled": true,
"altDetectEnabled": true,
"firewallEnabled": true,
"antiNukeEnabled": false,
"antiRaidEnabled": false,
"createdAt": "2024-01-15T00:00:00Z",
"updatedAt": "2024-06-01T00:00:00Z"
}
],
"pagination": { "page": 1, "limit": 25, "total": 3, "totalPages": 1 }
}
---
POST /api/v1/servers
Request body:
{
"discordGuildId": "123456789012345678",
"customBotId": "uuid-of-your-bot",
"name": "My Community",
"verifiedRoleId": "987654321098765432",
"logChannelId": "111222333444555666"
}
Response (201):
{
"data": { "id": "uuid", ... }
}
Server Detail — Get, Update, Delete
GET /api/v1/servers/:id
PUT /api/v1/servers/:id
DELETE /api/v1/servers/:id
Warning: Deleting a server is permanent. All verified members, backups, firewall rules, and analytics data for that server are permanently deleted.
Verified Members
List verified members for a server with pagination, search, and pullable filter.
GET /api/v1/servers/:id/members?page=1&limit=25&search=john&pullable=true
Backups — List & Create
GET /api/v1/servers/:id/backups?page=1&limit=25
POST /api/v1/servers/:id/backups
Tip: Backup creation is asynchronous. The POST returns immediately with status "queued". Poll the GET endpoint to check when the backup is ready.
Restore a Backup
POST /api/v1/servers/:id/backups/:backupId/restore
Warning: Restoring channels deletes all existing channels in the target server. This is irreversible.
Member Pulling
POST /api/v1/servers/:id/pull
GET /api/v1/pulls/:id
Firewall Rules
GET /api/v1/servers/:id/firewall
POST /api/v1/servers/:id/firewall
DELETE /api/v1/servers/:id/firewall?ruleId=uuid
Tip: Rule types: IP, COUNTRY, ASN, FINGERPRINT, USER_ID, SERVER_ID, REGION. Duplicate rules (same type + value) return HTTP 409.
Whitelist Rules
GET /api/v1/servers/:id/whitelist
POST /api/v1/servers/:id/whitelist
DELETE /api/v1/servers/:id/whitelist?ruleId=uuid
Blacklist
POST /api/v1/servers/:id/blacklist
Blacklists are per-user (not per-server). When you blacklist a Discord user ID, they are blocked from verifying across ALL of your servers.
Analytics
GET /api/v1/servers/:id/analytics?period=30d
The funnel object shows how many verification attempts reached each stage. Use this to identify where members are dropping off.
Marketplace Listings
GET /api/v1/marketplace/listings?category=GAMING&sort=rating&page=1&limit=25
POST /api/v1/marketplace/orders
GET /api/v1/marketplace/orders/:id
Complete Endpoint Reference
| Method | Endpoint | Description |
|---|---|---|
| GET | /api/v1/account | Get authenticated user's account info, plan, limits |
| GET | /api/v1/bots | List your custom bots |
| POST | /api/v1/bots | Create a new custom bot |
| GET | /api/v1/servers | List your servers (paginated) |
| POST | /api/v1/servers | Create a new server |
| GET | /api/v1/servers/:id | Get server details with counts |
| PUT | /api/v1/servers/:id | Update server settings (partial) |
| DELETE | /api/v1/servers/:id | Delete a server and all its data |
| GET | /api/v1/servers/:id/members | List verified members (paginated, searchable, filterable) |
| GET | /api/v1/servers/:id/backups | List backups for a server (paginated) |
| POST | /api/v1/servers/:id/backups | Create a new backup (async) |
| POST | /api/v1/servers/:id/backups/:backupId/restore | Restore a backup (async) |
| POST | /api/v1/servers/:id/pull | Start a member pull job (async) |
| GET | /api/v1/pulls/:id | Get pull job status and progress |
| GET | /api/v1/servers/:id/firewall | List firewall rules |
| POST | /api/v1/servers/:id/firewall | Add a firewall rule |
| DELETE | /api/v1/servers/:id/firewall?ruleId=x | Delete a firewall rule |
| GET | /api/v1/servers/:id/whitelist | List whitelist rules |
| POST | /api/v1/servers/:id/whitelist | Add a whitelist rule |
| DELETE | /api/v1/servers/:id/whitelist?ruleId=x | Delete a whitelist rule |
| POST | /api/v1/servers/:id/blacklist | Blacklist a Discord user |
| GET | /api/v1/servers/:id/analytics | Get server analytics and verification funnel |
| GET | /api/v1/marketplace/listings | Browse marketplace listings (paginated, filterable) |
| POST | /api/v1/marketplace/orders | Create a marketplace order |
| GET | /api/v1/marketplace/orders/:id | Get order status and fulfillment progress |
HTTP Status Codes
| Code | Meaning |
|---|---|
| 200 | Success — resource returned |
| 201 | Created — resource created successfully |
| 202 | Accepted — async job queued (backup, restore, pull) |
| 400 | Bad Request — invalid input or validation error |
| 401 | Unauthorized — missing or invalid API key |
| 403 | Forbidden — plan does not include this feature or limit exceeded |
| 404 | Not Found — resource does not exist or not owned by you |
| 409 | Conflict — duplicate resource (e.g., firewall rule already exists) |
| 429 | Rate Limited — too many requests or pull cooldown not elapsed |
| 500 | Internal Server Error — unexpected failure |