API Reference

Analytics

Analytics API endpoints for RestoreCord member activity, member event timelines, firewall activity and migration performance across your Discord servers.

Overview

Analytics endpoints require an API key with READ_ANALYTICS. Results cover servers the key's account owns and servers it can access as a sub-user; the single-server firewall analytics route requires ownership.

EndpointPurpose
GET /api/v3/servers/analyticsMember analytics by query type.
GET /api/v3/servers/firewall/analyticsFirewall analytics across all owned servers or one internal serverId.
GET /api/v3/servers/{serverId}/firewall/analyticsFirewall analytics for one internal RestoreCord server ID.
GET /api/v3/servers/members/eventsVerified/joined/deauthorized/left event timeline.
GET /api/v3/servers/migrations/statsMigration performance and retention metrics.

Member Analytics

Auth: API key with READ_ANALYTICS.

Returns one analytics query or a batched response for comma-separated query names.

GET /api/v3/servers/analytics

Prop

Type

QueryDescription
graphVerification counts over the requested time range.
recentRecently verified members.
serverPer-server member counts and metadata.
countryMembers grouped by country.
deviceMembers grouped by operating system/device data.
browserMembers grouped by browser.
mapCountry distribution suitable for map views.
referrerVerified members per verification tracking link (name, code, serverId, deleted, count). Deleted links are listed while they still have members.
integrityAccount quality/integrity summary.
ispISP breakdown. Plan gated.
stateRegion/state breakdown where data is available.
cityCity breakdown where data is available.
{
  "success": true,
  "batch": true,
  "results": {
    "graph": { "success": true, "data": [] },
    "recent": { "success": true, "members": [] }
  }
}

Firewall Analytics: All Servers

Auth: API key with READ_ANALYTICS.

Returns firewall totals, time series, top blocked sources, and recent logs for accessible servers.

GET /api/v3/servers/firewall/analytics

Prop

Type

{
  "success": true,
  "statistics": {
    "total": 120,
    "allowed": 80,
    "denied": 30,
    "passwordUsed": 4,
    "passwordInvalid": 1,
    "rateLimited": 2,
    "bypassUsed": 3,
    "verificationOverTime": [],
    "hourlyData": [],
    "topBlockedIPs": [{ "ip": "203.0.113.10", "count": 6 }],
    "topBlockedCountries": [{ "country": "US", "count": 10 }],
    "ruleEffectiveness": [],
    "recentLogs": []
  },
  "period": { "days": 30, "startDate": "...", "endDate": "..." },
  "servers": [{ "guildId": "123456789012345678", "name": "Main Server" }]
}

Firewall Analytics: Single Server

Auth: API key with READ_ANALYTICS. serverId is the internal RestoreCord server ID.

Returns firewall analytics for one owned server.

GET /api/v3/servers/{serverId}/firewall/analytics

Prop

Type

Top blocked IPs are only included when the server has IP logging enabled and the account plan can access IP logging.

Member Events

Auth: API key with READ_ANALYTICS.

Returns verified members plus Discord member event counts over time.

GET /api/v3/servers/members/events

Prop

Type

PlanIncluded event fields
Free/Premiumverified, joined, deauthorized
BusinessAdds left.
EnterpriseAdds massPing.

The response also includes migrationSeries for migration line metadata. Each data[] row may include matching dynamic migration_<id> values, set to null before the migration start date and successCount from the start date onward.

{
  "success": true,
  "data": [
    {
      "date": "2026-06-30",
      "verified": 4,
      "joined": 6,
      "left": 1,
      "massPing": 0,
      "deauthorized": 2,
      "migration_42": 128
    }
  ],
  "migrationSeries": [
    {
      "key": "migration_42",
      "id": 42,
      "startedAt": "2026-06-30T10:00:00.000Z",
      "status": "COMPLETED",
      "successCount": 128,
      "totalCount": 150,
      "sourceGuildId": "111111111111111111",
      "targetGuildId": "222222222222222222"
    }
  ]
}

Migration Stats

Auth: API key with READ_ANALYTICS.

Returns migration totals, success rates, flow breakdowns, and retention data.

GET /api/v3/servers/migrations/stats

Prop

Type

{
  "success": true,
  "statistics": {
    "totalMigrations": 4,
    "successfulMigrations": 3,
    "failedMigrations": 1,
    "averageSuccessRate": 92.5,
    "totalMembersMigrated": 1200,
    "totalMembersJoined": 1200,
    "totalMembersLeft": 45,
    "memberRetentionRate": 96.3,
    "avgMigrationDuration": 180
  },
  "recentMigrations": [],
  "successRateOverTime": [],
  "memberFlowBreakdown": [],
  "memberMovementOverTime": [],
  "ratioDistribution": [],
  "total": 4
}

Errors and Access

StatusCodeWhen
400INVALID_INPUTUnknown analytics query, invalid limit, invalid days, or malformed internal server ID.
401UNAUTHORIZEDMissing or invalid auth.
403INSUFFICIENT_PERMISSIONSAPI key lacks READ_ANALYTICS or the plan does not allow a specific breakdown.
404NOT_FOUNDserverId was supplied but is not accessible to the account.
503SERVICE_UNAVAILABLEThe analytics service is temporarily unavailable.

On this page