0 people focusing right now

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.

Base URL: https://game.regardingwork.com/api
Authentication: JWT Bearer tokens (30-day expiration)
Content-Type: application/json
For Mac App Developers: Sample user "janechen" prefers 45-minute sessions (not 25!), has an 8-session daily goal, and maintains a 12-day streak. Your app must handle real user preferences, not defaults.
See complete sample data examples for all API responses.

Features

  • 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
Session Management
Analytics & Data
Projects System
System Status

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 Now
Endpoint: /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
Use Individual Projects (/api/projects) for:
  • Personal productivity apps
  • User preference dropdowns
  • Solo work session tracking
  • Private project management
Use Team Projects (/api/team-projects) for:
  • 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
Complete Documentation

Full API reference with all endpoints and parameters.

View Full Docs
Sample Data Examples

Real response examples with user "janechen" showing 45-min sessions and preferences.

View Examples
Download Apps

Get our desktop and mobile apps that use this API.

Download Apps

Need Help?

Building something cool with our API? We'd love to hear about it!

Contact Support