API Reference

Analytics

Retrieve contest performance metrics

Analytics

Pull performance metrics and statistics for your contests.


Get Contest Analytics

GET/api/v1/contests/:contestId/analytics
Public or Private API Key

Returns aggregated analytics for a specific contest, including entry counts, views, bonus action completions, and point statistics.

Path Parameters

contestIdstring required

The unique contest identifier

Request

bash
curl -X GET https://blitzrocket.com/api/v1/contests/clx1abc123/analytics \
  -H "x-api-key: your_api_key_here"

Response

json
{
  "success": true,
  "data": {
    "totalEntries": 1523,
    "confirmedEntries": 1489,
    "disqualifiedEntries": 12,
    "totalViews": 28450,
    "totalBonusCompletions": 4567,
    "points": {
      "total": 45890,
      "average": 30.1,
      "highest": 890
    }
  }
}

Response Fields

totalEntriesnumber

Total number of entries in the contest

confirmedEntriesnumber

Entries with confirmed email addresses

disqualifiedEntriesnumber

Number of disqualified entries

totalViewsnumber

Total contest page views

totalBonusCompletionsnumber

Total bonus action completions across all entries

points.totalnumber

Sum of all points across all entries

points.averagenumber

Average points per entry

points.highestnumber

Highest point total for a single entry

Usage Notes

  • Analytics are computed in real-time from the contest data
  • Use these metrics to track contest performance and engagement
  • Combine with the leaderboard endpoint for comprehensive dashboards

Example: Analytics Dashboard

javascript
async function getContestDashboard(contestId, apiKey) {
  const [analyticsRes, leaderboardRes, contestRes] = await Promise.all([
    fetch(`https://blitzrocket.com/api/v1/contests/${contestId}/analytics`, {
      headers: { "x-api-key": apiKey },
    }),
    fetch(`https://blitzrocket.com/api/v1/contests/${contestId}/leaderboard?limit=5`, {
      headers: { "x-api-key": apiKey },
    }),
    fetch(`https://blitzrocket.com/api/v1/contests/${contestId}`, {
      headers: { "x-api-key": apiKey },
    }),
  ]);

  const [analytics, leaderboard, contest] = await Promise.all([
    analyticsRes.json(),
    leaderboardRes.json(),
    contestRes.json(),
  ]);

  return {
    contest: contest.data,
    analytics: analytics.data,
    topParticipants: leaderboard.data,
    conversionRate:
      analytics.data.totalViews > 0
        ? ((analytics.data.totalEntries / analytics.data.totalViews) * 100).toFixed(1)
        : "0",
  };
}

Error Responses

Common error responses for this endpoint.

StatusErrorDescription
400Missing contestIdThe contestId path parameter is required
401Invalid API keyAPI key is missing or invalid
404Contest not foundNo contest exists with the given ID