Trophy for Developers
Add app gamification in minutes
Trophy is a gamification platform with pre-built APIs and type-safe SDKs for adding achievements, streaks, points, and leaderboards to your web or mobile app.
APIs
One SDK, every gamification feature
Type-safe SDKs and REST APIs for building engaging user experiences. Ship gamification in hours, not months.
Metrics API
Track any user interaction. Send events, query aggregates, and power gamification features.
POST /metrics/{key}/eventGET /users/{id}/metricsStreaks API
Build habit-forming streak mechanics. Track consecutive user activity and manage streak freezes.
GET /users/{id}/streakPOST /streaks/freezesAchievements API
Create and manage achievement campaigns. Track user progress and award badges programmatically.
GET /users/{id}/achievementsPOST /achievements/{key}/completePoints API
Implement XP and point systems. Award points for actions, track levels, and manage point multipliers.
GET /users/{id}/pointsPOST /points/boostsLeaderboards API
Create competitive leaderboards. Fetch rankings, manage periods, and display user standings.
GET /leaderboards/{key}GET /users/{id}/leaderboards/{key}Wrapped API
Generate year-in-review experiences. Aggregate user activity into shareable wrapped summaries.
GET /users/{id}/wrappedWebhooks
Receive gamification events over HTTP POST. Power custom workflows from Trophy data.
POST → your endpointX-Trophy-SignatureQuick start
Ship gamification in minutes
Get up and running with Trophy in five simple steps. No complex configuration required.
Install the SDK
Add Trophy to your project with your package manager.
npm install @trophyso/nodeInitialize the client
Set up the Trophy client with your API key.
import { TrophyApiClient } from '@trophyso/node';
const trophy = new TrophyApiClient({
apiKey: process.env.TROPHY_API_KEY
});Track your first event
Send user events to power gamification features.
await trophy.metrics.event("lessons", {
user: { id: "user-123" },
value: 1
});Fetch gamification data
Retrieve achievements, streaks, points, and more.
const streak = await trophy.users.streak("user-123");
const points = await trophy.users.points("user-123");Display gamification UI
Use open-source UI components.
npx shadcn@latest add https://ui.trophy.so/streak-calendarBuilt for production workloads
Reliable infrastructure designed for performance at scale.
- Uptime SLA
- 99.99%
- p95 API Latency
- 200ms
- Monthly API Requests
- 150M
- Users Tracked
- 1M+
Get started