Webhooks
Power custom workflows using Trophy data
Subscribe to key gamification events like achievement.completed, leaderboard.finished, and streak.lost. Receive HTTP POST payloads from Trophy and trigger custom code in your application.
Quickstart
Quickstart: verify and handle a webhook
Create a webhook in the Trophy dashboard, point it at your endpoint, and verify the X-Trophy-Signature header on every request before handling the event.
import crypto from "crypto";
import { NextRequest, NextResponse } from "next/server";
export async function POST(request: NextRequest) {
const signature = request.headers.get("X-Trophy-Signature");
const body = await request.text();
const hash = crypto
.createHmac("sha256", process.env.TROPHY_WEBHOOK_SECRET!)
.update(body)
.digest("base64");
if (hash !== signature) {
return NextResponse.json({ message: "Rejected" }, { status: 403 });
}
const payload = JSON.parse(body);
switch (payload.type) {
case "achievement.completed":
// Handle achievement completed
break;
case "streak.lost":
// Handle streak lost
break;
case "leaderboard.finished":
// Handle leaderboard finished
break;
default:
break;
}
return NextResponse.json({ message: "Received" }, { status: 200 });
}Use case
Extend gamification beyond Trophy
React to Trophy events in real time to build custom integrations, automate workflows, and power extended gamification experiences.
- Custom notifications
- Trigger custom email and push notification sequences when users complete achievements, extend streaks, or move up leaderboards.
- Data warehousing
- Stream Trophy events into your data warehouse to analyze gamification activity alongside the rest of your product data.
- Extended workflows
- Power non-gamification workflows like subscription updates, feature unlocks, and third-party integrations from Trophy events.

Reliability
Production-ready webhook delivery
Build secure, resilient webhook handlers with signature verification, automatic retries, and delivery monitoring built in.
- Secure payloads
- Every event includes a security token so you can verify payloads originated from Trophy and reject malicious requests.
- Automatic retries
- Trophy retries failed deliveries when your endpoint returns a non-2XX status code, so transient failures do not mean missed events.
- Delivery observability
- Monitor webhook delivery from the Trophy dashboard to diagnose issues and confirm events are reaching your endpoints.

Events
Subscribe to the events that matter
Configure webhooks in the Trophy dashboard to receive only the event types you need. Each payload includes the event type so your handler can process multiple events from a single endpoint.
Built 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+
Gamification at scale
Industry giants retain with gamification
Learn how some of the largest consumer apps use gamification to retain users.
“If it's not fun, it's not going to work.”

“Another huge driver behind our MAU and subscriber growth was our annual Wrapped campaign… Wrapped is always a big contributor to our Q4 performance.”

“Streaks are our golden goose. A disgusting amount of Duolingo's success is tied to streaks. They drive engagement, retention, and even other features like notifications. Without streaks, we would not be where we are today.”

“If you need people to come back on their own — unprompted user engagement — you have to build habits. Without them, the business model doesn't work.”

“Streaks have had a positive impact for us. The main lift has been on retention rather than activation. We've seen meaningful gains from week one through to week ten.”

“What really matters is not the initial excitement, but whether people build a habit around the product... Once people can see progress, they're much more motivated to continue.”

“The streak feature is the single most impactful feature that contributed to this growth and success. In other words, you could argue that one feature created billions of dollars of value.”

Customers
Meet our customers
Learn why over 40 product teams trust Trophy to power gamification experiences and increase retention.
FAQ
Frequently asked questions
Have a different question and can’t find the answer you’re looking for? Send us an email.
Get started




