All Gami SDKs are thin clients over this API. Authenticate with a Bearer token, send events, read user state, manage quests, webhooks, and rewards.
https://api.gami.io/v1/v1/eventsTrack a gamification event for a user.
curl -X POST https://api.gami.io/v1/events \
-H "Authorization: Bearer $GAMI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"userId": "user_123",
"action": "QUEST_COMPLETE",
"metadata": { "questId": "q_001" }
}'/v1/users/:idReturn XP, level, badges, and points for a user.
curl https://api.gami.io/v1/users/user_123 \
-H "Authorization: Bearer $GAMI_API_KEY"/v1/users/:id/rewardsGrant a reward to a user.
curl -X POST https://api.gami.io/v1/users/user_123/rewards \
-H "Authorization: Bearer $GAMI_API_KEY" \
-d '{ "type": "xp", "amount": 250 }'/v1/questsList quests for the active project.
curl https://api.gami.io/v1/quests?status=active \
-H "Authorization: Bearer $GAMI_API_KEY"/v1/leaderboardFetch the project leaderboard.
curl https://api.gami.io/v1/leaderboard?limit=100 \
-H "Authorization: Bearer $GAMI_API_KEY"/v1/webhooksRegister a webhook endpoint.
curl -X POST https://api.gami.io/v1/webhooks \
-H "Authorization: Bearer $GAMI_API_KEY" \
-d '{ "url": "https://your-app.com/hook", "events": ["xp.earned"] }'