RegardingWork Game API Documentation
Build apps that sync with our productivity platform
Overview
Our RESTful API enables external applications (Mac desktop app, mobile apps, etc.) to sync with the RegardingWork Game web platform.
https://game.regardingwork.com/api
Authentication: JWT Bearer tokens (30-day expiration)
Content-Type:
application/json
See complete sample data examples for all API responses.
Quick Start
Ready to integrate?
Get Started Download AppsFor Developers
Anti-Cheat System Terminology Guide Anti-Cheat GuideFeatures
- JWT Authentication (30-day tokens)
- Real-time Pomodoro session sync
- Session cancellation tracking
- Enhanced analytics & metadata
- Complete user data retrieval
- Leaderboard access
- Preference synchronization
Core API Endpoints
Authentication & User Data
- POST /api/login - Authenticate user
- GET /api/user/data - Get user profile
- PUT /api/user/preferences - Update settings
Session Management
- 📋 Session ID Types - UUID vs Database ID
- POST /api/session/start - Start focus session
- POST /api/pomodoro/submit - Complete session
- POST /api/session/cancel - Cancel session
Analytics & Data
- GET /api/analytics/tracking - Usage insights
- GET /api/leaderboard - Rankings
Projects System
- GET /api/projects - 👤 Individual projects
- GET /api/team-projects - 🫂 Team projects
- GET /api/team-projects/{id} - Specific team project
- GET /api/all-projects - 📋 Combined view
System Status
- GET /api/sync/status - Sync status
- GET /api/health - Service health
Projects System Overview
RegardingWork has a sophisticated project system designed to handle both individual work and team collaboration.
👤 Individual Projects
Endpoint: /api/projects
Personal projects that belong to individual users. Perfect for solo work, side projects, and personal productivity tracking.
- Private to the user
- Session statistics included
- Custom colors and categories
- Used in apps and web timer
🫂 Team Projects
Endpoint: /api/team-projects
Collaborative projects shared within teams. Designed for B2B workplace productivity with Slack integration.
- Shared within teams
- Role-based access control
- Slack notifications
- Manager oversight features
📋 All Projects
Available NowEndpoint: /api/all-projects
Unified view combining both individual and team projects. Provides a comprehensive overview for apps and dashboards.
- Combined data source
- Type indicators (👤/🫂)
- Unified sorting options
- Simplified app integration
When to Use Which Endpoint
- Personal productivity apps
- User preference dropdowns
- Solo work session tracking
- Private project management
- B2B workplace features
- Team collaboration tools
- Manager dashboards
- Slack integration features
Quick Start
1. Authentication
// Login to get JWT token
const response = await fetch('https://game.regardingwork.com/api/login', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
username: 'your_username',
password: 'your_password'
})
});
const { token } = await response.json();
localStorage.setItem('jwt_token', token);
2. Sync Pomodoro Session
// Log completed Pomodoro from your app
const token = localStorage.getItem('jwt_token');
const response = await fetch('https://game.regardingwork.com/api/pomodoro/complete', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({
duration: 45, // User's preferred duration
project: 'Mac App Development', // Real project name
category: 'Programming',
notes: 'Working on API integration'
})
});
// Response includes points, streak, and progress
const result = await response.json();
// { id: "117", points_earned: 1.8, current_streak: 13 }
3. Get User Data
// Fetch complete user profile and history
const response = await fetch('https://game.regardingwork.com/api/user/data', {
headers: { 'Authorization': `Bearer ${token}` }
});
const userData = await response.json();
// Returns: default_duration: 45, daily_goal: 8, current_streak: 12
// Real user preferences for Mac app customization!
Live API Demo
Test the API endpoints right here:
Health Check Test
Sample Data Examples
Real response examples with user "janechen" showing 45-min sessions and preferences.
View Examples