Trophy for Developers
Add gamification to your app in minutes
Production-ready APIs and type-safe SDKs for achievements, streaks, points, leaderboards, and more. Open-source UI components to help you get started. Focus on your product while we handle the gamification.
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-calendarLightning-Fast Integration
Simple APIs you'll love
Use our pre-built gamification API to effortlessly build engaging user experiences. Get a team that's 100% focused on engagement.
- Type-safe SDKs.
- We spend time worrying about abstractions and let you focus on what matters: building a great experience for your users.
- Intuitive documentation.
- Documentation built by developers for developers. Get started in minutes, not hours.
- Effortless debugging.
- Get to the root of the issue fast with detailed event logs and error messages.
// Server: Handle user writing submission
// Validate submission
if (!text || text.length === 0) return;
const wordCount = text.split(' ').length;
// Track event in Trophy
await trophy.metrics.event(
"words",
{
user: {
id: "user-123",
email: "user@example.com"
},
value: wordCount
}
);
// Save progress
await saveProgress(wordCount);
return wordCount;
Gamification UI Library
Pixel-perfect UI components
Use our open-source gamification UI components as the foundation for your design system. Customize as you see fit. Designed to work perfectly with the Trophy API.
- One-command install
- Add any component to your project with a single CLI command. No extra dependencies to manage.
- Fully customizable
- Every component lives in your codebase. Tweak styles, layout, and behavior to match your brand.
- Open-source.
- MIT licensed and community-driven. Use in personal projects or production apps without restrictions.
Built for production workloads
Reliable infrastructure designed for performance at scale.
- Historical Uptime
- 99.99%
- Avg Response Time
- <50ms
- Integration Time
- < 1 hour
- Users Tracked
- 1M+
Gamification infrastructure that retains users
Boost retention and customer lifetime value. Try for free up to 100 MAUs.
