Plug gamification into your app

Quick Start

curl -X POST https://api.rooguy.com/v1/events \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "user_123",
    "event_name": "purchase-completed",
    "properties": {
      "amount": 99.99,
      "product_id": "prod_456"
    }
  }'

SDKs

npm install @rooguys/js
import Rooguys from '@rooguys/js';

const client = new Rooguys('YOUR_API_KEY', {
  baseUrl: 'https://api.rooguy.com/v1',
});

await client.events.track('level-completed', 'user_123', {
  difficulty: 'hard',
  score: 1500
});

API Reference

REST API

  • POST /v1/events - Track events
  • GET /v1/users/:id - Get user profile
  • GET /v1/leaderboards/global - Leaderboards
  • POST /v1/users/:id/quests/:id/claim - Claim quests

Authentication

All requests require an API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Ready to add the first mechanic to your app?

Need help?