API Reference
Chronova exposes a modern JSON API, fully compatible with existing WakaTime tooling
Welcome, developers
The Chronova API mirrors familiar WakaTime endpoints while giving you full control over your data. Authenticate with API keys, send heartbeats, and pull analytics without changing your existing tooling.
Authentication Methods
Authorization: Bearer API_KEYAuthorization: Basic API_KEYX-API-KEY: API_KEY?api_key=API_KEYAll methods are supported. Your API key: YOUR_API_KEY
API Information
https://chronova.devv1application/jsonAuthentication Examples
cURL
curl -X GET "https://chronova.dev/api/v1/users/current" \ -H "Authorization: Bearer YOUR_API_KEY"JavaScript
const response = await fetch('https://chronova.dev/api/v1/users/current', { headers: { 'Authorization': 'Bearer YOUR_API_KEY' }})Python
import requests headers = { 'Authorization': 'Bearer YOUR_API_KEY'}response = requests.get('https://chronova.dev/api/v1/users/current', headers=headers)Metrics & streaming
SSE event stream and Prometheus metrics.
Rate limits
Throughput limits and best practices.
SDKs & tooling
CLI, editor plugins, and migration utilities.
User management
Profile data, privacy preferences, and GDPR exports.
/api/v1/users/currentFetch authenticated user profile and subscription state.
Important Notes
- Requires Bearer token in the Authorization header.
Response Example
{ "data": { "id": "user_123", "username": "johndoe", "display_name": "John Doe", "email": "user@example.com", "subscriptionPlan": "pro", "subscriptionStatus": "active", "languages_used_public": true, "projects_public": false, "created_at": "2024-01-01T00:00:00Z" }}/api/v1/users/currentUpdate public profile, privacy toggles, or display preferences.
Important Notes
- Send only the fields you wish to update.
Request Example
{ "display_name": "John Smith", "is_profile_private": false, "languages_used_public": true, "projects_public": false, "displayMinimumDuration": 1}/api/v1/users/current/data-summaryGet comprehensive data overview including heartbeats, analytics, and goals.
Returns summary statistics for all user data including total coding time, project breakdown, and goal progress.
Important Notes
- Provides GDPR-compliant data overview for compliance purposes.
Response Example
{ "data": { "total_heartbeats": 15000, "total_coding_time": 450000, "projects_count": 12, "languages_count": 8, "goals_count": 3, "organizations_count": 2, "first_heartbeat": "2024-01-01T00:00:00Z", "last_heartbeat": "2024-11-29T22:00:00Z" }}/api/v1/users/current/exportExport user data in multiple formats (JSON, Markdown, XML, CSV, XLS).
Returns heartbeats, analytics, goals, and organization memberships in the requested format. Supports JSON, Markdown, XML, CSV, and XLS formats.
/api/v1/users/current/deletePermanently delete user account and all associated data.
This action is irreversible and will delete all user data including heartbeats, analytics, goals, and organization memberships.
Important Notes
- Irreversible action - all data will be permanently deleted.
- Requires password and confirmation "DELETE MY ACCOUNT".
/api/v1/users/current/wakatimeGet WakaTime integration status and configuration.
Response Example
{ "data": { "wakatime_sync_enabled": true, "wakatime_plan_status": "premium", "last_sync": "2024-11-29T21:30:00Z", "sync_jobs_count": 5, "imported_heartbeats": 12000 }}/api/v1/users/current/wakatimeUpdate WakaTime integration settings.
Important Notes
- WakaTime Premium required for full sync functionality.
/api/v1/users/current/wakatimeDisconnect WakaTime integration.
/api/v1/users/current/resend-verificationResend email verification link.
Sends a new verification email if the previous one expired or was not received.
Important Notes
- Limited to 3 resend attempts per hour.
/api/v1/users/current/send-verification-emailSend email verification for account activation.
Sends verification email to confirm email address ownership.
Important Notes
- Automatically sent during registration, use resend-verification for expired links.
/api/v1/users/current/rotate-api-keyRotate the current API key and generate a new one.
Invalidates the current API key and generates a new one. The old key will stop working immediately.
Important Notes
- The old API key will be immediately invalidated.
- Update your applications with the new key.
Request Example
{ "password": "your_password"}Response Example
{ "data": { "api_key": "waka_••••••••", "created_at": "2024-11-29T22:00:00Z" }}/api/v1/users/current/reset-heartbeatsReset all heartbeats for the current user.
Permanently delete all heartbeat data for testing or cleanup purposes.
Important Notes
- Irreversible action - all heartbeat data will be permanently deleted.
- Requires password and confirmation.
/api/v1/users/current/api-key-historyGet API key rotation history for audit purposes.
Returns the last 10 API key rotations with timestamps and metadata.
Response Example
{ "data": [ { "id": "history_123", "rotatedAt": "2024-11-29T22:00:00Z", "rotatedBy": "user", "isActive": false } ]}/api/v1/users/current/orgGet user organization information and membership details.
Important Notes
- Returns all organizations the user belongs to with role information.
Response Example
{ "data": { "organizations": [ { "id": "org_123", "name": "ACME Corporation", "role": "admin", "member_count": 15 } ], "primary_organization": "org_123" }}/api/v1/users/current/orgCreate or join an organization.
/api/v1/users/current/profileUpdate profile (with CSRF protection).
Request Example
{ "display_name": "John Smith", "is_profile_private": false}/api/v1/users/current/set-passwordSet password for first-time OAuth users or password reset.
Allows users who registered via OAuth to set a password for API key access.
/api/v1/users/current/google/authStart the OAuth flow to connect Google to Chronova.
/api/v1/users/current/google/authDisconnect Google integration.
Analytics & heartbeats
Pull statistics or push coding heartbeats to Chronova.
/api/v1/users/current/stats/{range}Retrieve time-tracking statistics for a predefined range.
Valid ranges: today, yesterday, last_7_days, last_30_days, last_6_months, last_year. Add ?timezone= with an IANA name such as Europe/Berlin to start "today" at your local midnight; without it "today" follows the server clock. A range of at most one day also returns hourly_timeline, one bucket per hour keyed by its start in epoch seconds.
Response Example
{ "data": { "total_seconds": 28800, "daily_average": 4800, "languages": [ { "name": "TypeScript", "total_seconds": 18000, "percent": 62.5 } ], "editors": [ { "name": "VS Code", "total_seconds": 25200, "percent": 87.5 } ], "projects": [ { "name": "chronova", "total_seconds": 20000, "percent": 69.4 } ] }}/api/v1/users/current/all_time_since_todayGet all-time cumulative statistics.
Returns cumulative statistics for all time including total coding time, daily average, and breakdown by language, editor, and project.
Response Example
{ "data": { "total_seconds": 864000, "daily_average": 2400, "languages": [ { "name": "TypeScript", "total_seconds": 432000, "percent": 50.0 } ], "editors": [ { "name": "VS Code", "total_seconds": 691200, "percent": 80.0 } ], "projects": [ { "name": "chronova", "total_seconds": 518400, "percent": 60.0 } ] }}/api/v1/users/current/durationsGet detailed duration data for coding sessions.
Returns granular duration data including session start/end times, project, language, and editor information.
Response Example
{ "data": [ { "start_time": "2024-11-29T09:00:00Z", "end_time": "2024-11-29T17:00:00Z", "duration": 28800, "project": "chronova", "language": "TypeScript", "editor": "VS Code", "branch": "main" } ]}/api/v1/users/current/heartbeatsSubmit one or many activity heartbeats.
Request Example
[ { "entity": "/path/to/file.ts", "type": "file", "time": 1640995200, "language": "TypeScript", "editor": "VS Code", "project": "chronova", "branch": "main", "is_write": true }]/api/v1/users/current/heartbeatsRetrieve heartbeats with pagination.
Supports query parameters: date, page, per_page.
/api/v1/users/current/heartbeats.bulkSubmit multiple heartbeats in a single request.
Bulk endpoint for submitting large numbers of heartbeats efficiently.
Important Notes
- Maximum 1000 heartbeats per request.
- Recommended for batch processing.
/api/v1/users/current/heartbeats.bulkRetrieve heartbeats in bulk.
/api/v1/users/current/analytics/commit-correlationCorrelate commits with coding sessions to surface productivity patterns.
/api/v1/users/current/external_durationsGet external duration data from connected services.
Returns duration information from external integrations like GitHub, GitLab, etc.
Response Example
{ "data": [ { "service": "github", "repository": "username/chronova", "duration": 7200, "date": "2024-11-29", "commit_count": 5 } ]}/api/v1/users/current/external_durationsCreate external duration from connected services.
Request Example
{ "entity": "project/repo/commit", "type": "external_duration", "project": "chronova", "start": 1701292800, "end": 1701300000, "timezone": "UTC"}Response Example
{ "data": { "id": "ed_123", "entity": "project/repo/commit", "type": "external_duration", "project": "chronova", "duration": 7200, "start": 1701292800, "end": 1701300000 }}/api/v1/users/current/external_durationsDelete external duration by ID.
Remove a specific external duration by its ID. Requires ID query parameter.
Important Notes
- Delete requires `id` query parameter: `?id=ed_123`
/api/v1/users/current/analytics/aiGet AI-assisted coding analytics.
Returns insights about AI tool usage, including time spent with AI editors, AI contribution percentage, and per-language AI breakdown. Accepts the same ?timezone= parameter as the stats endpoint, and returns hourlyTimeline for a range of at most one day.
Summaries & time
Aggregated daily summaries, streaks, and focus analytics.
/api/v1/users/current/summariesGet daily coding summaries.
Aggregated daily summaries with language, project, and editor breakdowns. Supports query parameters: start, end, project, branches.
Response Example
{ "data": [ { "date": "2024-11-29", "total_seconds": 28800, "languages": [ { "name": "TypeScript", "total_seconds": 18000 } ], "projects": [ { "name": "chronova", "total_seconds": 20000 } ], "editors": [ { "name": "VS Code", "total_seconds": 25200 } ] } ]}/api/v1/users/current/streaksGet current streak information.
Streak data including current, longest, and history.
/api/v1/users/current/focusGet focus metrics.
Focus time analysis including deep work sessions.
/api/v1/users/current/analytics/focusGet detailed focus analytics.
Breakdown by project, language, and time of day.
/api/v1/users/current/statusbar/todayGet today's statusbar summary.
Lightweight endpoint for editor statusbar plugins.
Organizations & invites
Manage teams, roles, invitations, and billing context.
/api/v1/organizationsList organizations for current user.
/api/v1/organizationsCreate a new organization.
Request Example
{ "name": "My Team", "slug": "my-team", "description": "Development team"}/api/v1/organizations/{orgId}Get organization details including name, description, and subscription status.
Response Example
{ "data": { "id": "org_123", "name": "ACME Corporation", "slug": "acme-corp", "description": "Leading software development company", "subscription_plan": "team", "subscription_status": "active", "member_count": 15, "created_at": "2024-01-01T00:00:00Z" }}/api/v1/organizations/{orgId}Update organization name, description, or settings.
Important Notes
- Requires admin or owner role in the organization.
/api/v1/organizations/{orgId}Permanently delete an organization and all associated data.
This action is irreversible and will delete all organization data including member records, projects, and analytics.
Important Notes
- Irreversible action - all organization data will be permanently deleted.
- Requires owner role in the organization.
/api/v1/organizations/{orgId}/publicGet public organization information for display on public profiles.
Important Notes
- Returns only publicly visible information.
Response Example
{ "data": { "id": "org_123", "name": "ACME Corporation", "slug": "acme-corp", "description": "Leading software development company", "member_count": 15, "public_projects_count": 8 }}/api/v1/organizations/{orgId}/membersList organization members.
/api/v1/organizations/{orgId}/membersAdd a member to the organization.
/api/v1/organizations/{orgId}/members/{memberId}Update member role or permissions within the organization.
Important Notes
- Requires admin or owner role in the organization.
/api/v1/organizations/{orgId}/members/{memberId}Remove a member from the organization.
Important Notes
- Requires admin or owner role in the organization.
- Member will lose access to all organization resources.
/api/v1/organizations/{orgId}/invitesList organization invites.
/api/v1/organizations/{orgId}/invitesSend an invitation to join the organization.
Request Example
{ "email": "newmember@example.com", "role": "member"}/api/v1/organizations/{orgId}/billingGet billing information for the organization.
/api/v1/organizations/{orgId}/billingUpdate billing information for the organization.
/api/v1/organizations/{orgId}/analyticsGet organization analytics with member activity and project breakdown.
/api/v1/organizations/{orgId}/analytics/aiGet AI-assisted coding analytics for the organization.
Returns AI tool usage insights across organization members.
/api/v1/organizations/{orgId}/logoGet organization logo.
/api/v1/organizations/{orgId}/logoUpload or replace organization logo.
Accepts multipart/form-data uploads.
/api/v1/organizations/{orgId}/logoRemove organization logo.
/api/v1/users/current/orgsList organizations the current user belongs to.
Response Example
{ "data": [ { "id": "org_123", "name": "ACME Corporation", "slug": "acme-corp", "role": "admin", "memberCount": 15, "subscriptionPlan": "team" } ]}/api/v1/users/current/orgs/{org}/dashboardsGet organization dashboards.
/api/v1/users/current/orgs/{org}/dashboards/{dashboard}/membersGet dashboard members.
/api/v1/users/current/orgs/{org}/dashboards/{dashboard}/summariesGet dashboard summaries.
/api/v1/invitations/{token}View invitation details.
Unauthenticated endpoint to view invitation details before accepting.
/api/v1/invitations/{token}Accept an invitation.
/api/v1/invitations/{token}Decline or revoke an invitation.
Goals & personal tracking
Create, query, and analyze personal productivity goals.
/api/v1/users/current/goalsList configured goals with progress metrics.
Response Example
{ "data": [ { "id": "goal_123", "type": "daily", "target_seconds": 14400, "language": "TypeScript", "progress": { "current_seconds": 10800, "percentage": 75, "streak": 5 } } ]}/api/v1/users/current/goalsCreate a new goal for language, project, or editor usage.
Request Example
{ "type": "daily", "target_seconds": 14400, "language": "TypeScript"}/api/v1/users/current/goalsSoft-delete a goal by ID.
Important Notes
- This performs a soft delete - sets isEnabled to false rather than removing from database.
/api/v1/users/current/goals/analyticsAccess goal analytics including streaks and achievement ratios.
/api/v1/users/current/goals/suggestionsGet personalized goal suggestions based on coding patterns.
Returns AI-powered goal suggestions tailored to your coding habits, project focus, and historical productivity data.
Response Example
{ "data": { "suggestions": [ { "type": "daily", "target_seconds": 14400, "language": "TypeScript", "confidence": 0.85, "reason": "You spend 75% of your time on TypeScript projects" } ], "next_refresh": "2024-11-30T02:00:00Z" }}GitHub integration
Sync repositories and correlate commits with heartbeats.
/api/v1/users/current/github/repositoriesList connected GitHub repositories with metadata.
Response Example
{ "data": [ { "id": "repo_123", "full_name": "username/chronova", "html_url": "https://github.com/username/chronova", "description": "Time tracking platform", "private": false, "default_branch": "main" } ]}/api/v1/users/current/github/repositoriesUpdate GitHub repository settings.
/api/v1/users/current/github/repositories/refreshRefresh the list of connected GitHub repositories.
Force a refresh of the GitHub repository list to get the latest repository information.
Important Notes
- Requires active GitHub OAuth connection.
/api/v1/users/current/github/authStart the OAuth flow to connect GitHub to Chronova.
/api/v1/users/current/github/authDisconnect GitHub integration.
/api/v1/users/current/projectsList all tracked projects with metadata and coding statistics.
Response Example
{ "data": [ { "name": "chronova", "repository": "username/chronova", "total_seconds": 86400, "last_activity": "2024-11-29T22:00:00Z", "language_breakdown": { "TypeScript": 64800, "JavaScript": 21600 } } ]}/api/v1/users/current/projects/privacyGet project privacy settings.
/api/v1/users/current/projects/privacyUpdate project privacy settings.
/api/v1/users/current/projects/{project}/commitsRetrieve commits for a project with correlated coding time.
/api/v1/users/current/projects/{project}/commits/{hash}Get specific commit details.
/api/v1/users/current/sync/commitsSync commits from connected repositories.
/api/v1/users/current/sync/commitsGet commit sync status.
/api/v1/users/current/coupons/validateValidate a promotional coupon code.
Request Example
{ "code": "WELCOME2024"}/api/v1/github/releases/latest?repo={chronova-cli|chronova-mcp|chronova-android}Get the latest Chronova release information.
Returns version, release notes, and download links for the latest release of a Chronova repository (chronova-cli, chronova-mcp, or chronova-android; defaults to chronova-cli).
WakaTime Integration
Sync, export, and manage WakaTime data migration.
/api/v1/wakatime/syncStart a WakaTime data sync job.
Initiates synchronization of WakaTime data including heartbeats, summaries, and projects.
Important Notes
- WakaTime Premium required for full sync functionality.
- Sync jobs run asynchronously.
/api/v1/wakatime/exportExport WakaTime data to Chronova format.
Export WakaTime data for backup or migration purposes.
/api/v1/wakatime/jobs/{jobId}Get status and progress of a WakaTime sync/export job.
Response Example
{ "data": { "id": "job_123", "type": "sync", "status": "running", "progress": 65, "total_items": 15000, "processed_items": 9750, "started_at": "2024-11-29T22:00:00Z", "estimated_completion": "2024-11-29T23:30:00Z" }}/api/v1/wakatime/jobs/{jobId}Cancel a running WakaTime sync/export job.
Important Notes
- Only running jobs can be cancelled.
- Partial data may be retained.
/api/v1/wakatime/jobs/{jobId}/streamStream real-time progress updates for a WakaTime job.
Uses Server-Sent Events (SSE) for real-time updates.
Important Notes
- Uses Server-Sent Events (SSE) for real-time updates.
/api/v1/users/current/wakatime/jobsList all WakaTime sync/export jobs for the current user.
Response Example
{ "data": [ { "id": "job_123", "type": "sync", "status": "completed", "progress": 100, "started_at": "2024-11-29T22:00:00Z", "completed_at": "2024-11-29T23:30:00Z", "total_items": 15000, "successful_items": 14980, "failed_items": 20 } ]}WakaTime compatibility layer
Drop-in endpoints for WakaTime CLI and plugins.
/api/v1/compat/waka/users/currentReturn user info using WakaTime field names.
/api/v1/compat/waka/users/current/heartbeatsAccept heartbeat payloads in WakaTime JSON format.
/api/v1/compat/waka/users/current/heartbeatsGet heartbeats in WakaTime format.
/api/v1/compat/waka/users/current/stats/{range}Stats endpoint mirroring the WakaTime API contract.
/api/v1/compat/waka/users/current/summariesReturn summaries in a structure compatible with WakaTime dashboards.
/api/v1/compat/waka/users/current/projectsReturn projects in WakaTime format.
Response Example
{ "data": [ { "id": "project_123", "name": "chronova", "repository": "username/chronova", "last_heartbeat": "2024-11-29T22:00:00Z", "total_seconds": 86400 } ]}Metrics & streaming
Prometheus metrics and real-time SSE event stream.
/api/v1/events/streamServer-Sent Events stream for real-time dashboard updates.
Returns a persistent SSE connection. Events include heartbeat updates, goal progress, and organization activity. Falls back to keep-alive when Redis pub/sub is unavailable.
Important Notes
- Content-Type: text/event-stream
- Requires authenticated session or API key.
/api/v1/metricsPrometheus-format application metrics.
Exposes request counters, latency histograms, and cache hit/miss metrics for scraping by Prometheus.
Public & community
Leaderboards, public profiles, and platform statistics.
/api/v1/leadersGet leaderboard data.
Top contributors ranked by coding activity.
/api/v1/public/statsGet public platform statistics.
Aggregated public stats about the Chronova platform.
/api/v1/users/{user}Get public user profile by username.
Returns publicly visible profile information.
/api/v1/users/{user}/stats/{range}Get public user statistics.
Public stats if user's profile is not private.
/api/v1/users/{user}/goalsGet public user goals.
Public goals if user has made them visible.
Onboarding
Setup wizard progress and the dashboard tour, tracked per user.
/api/v1/onboarding/statusGet wizard progress.
Creates the status on first request; a user who already has heartbeats starts out completed.
/api/v1/onboarding/step-completeRecord a wizard step.
Body: step_id (choose-tool, connect, first-heartbeat, first-goal), optional tool and time_spent_ms.
/api/v1/onboarding/dismissDismiss the wizard for now.
Resumable; the next step-complete clears it.
/api/v1/onboarding/completeComplete the wizard.
Returns 409 until the first heartbeat has arrived.
/api/v1/onboarding/skipSkip the wizard.
/api/v1/onboarding/tour-completeRecord the end of the dashboard tour.
Body: outcome, either finished or closed.
/api/v1/onboarding/resetReset wizard progress.
Run the wizard again from the start.
Trademark notice
Need help integrating?
wakatime --today) for rapid assistance.