Skip to main content

API overview

The Analog WakaTime Gateway exposes a versioned HTTP API under:

https://<gateway-host>/main/api/v1

Production clients typically use the public Analog gateway that backs analogwakatime.com. Self-hosted deployments use your own gateway base URL.

This documentation describes client-facing surfaces used by:

  • IDE plugins (VS Code, JetBrains, compatible editors)
  • the Desktop Agent
  • the web app / dashboard (at a high level)
Scope of this guide

We intentionally do not publish every internal, administrative, billing-webhook, or privileged operations path here. Those routes exist for first-party services and are not part of the supported public integration surface.

If you are building a plugin or automation, stick to the endpoints documented in this section. Prefer device-flow or user API tokens issued from the product UI — never hard-code service credentials.

Conventions

TopicDetail
ProtocolHTTPS
Prefix/main/api/v1
FormatsJSON request/response bodies unless noted
AuthAuthorization: Bearer <token> on private routes
ErrorsJSON error payloads with HTTP 4xx/5xx

Interactive OpenAPI UI may be available on a deployment at /main/api/v1/docs/ for operators. Treat unpublished paths as unsupported.

Capability map

AreaWho uses itDoc page
Health / helloProbes, smoke testsAuthentication & basics
Device authorizationIDE plugins, Desktop AgentAuthentication & basics
IDE activity syncVS Code / JetBrains pluginsActivities
Desktop activity syncDesktop AgentActivities
Personal stats & profile readsDashboard / account toolsStats & profile
Public badges & public chartsREADME badges, landing widgetsPublic endpoints

Authentication model (summary)

  1. User session token — obtained via website login or plugin device flow; sent as Bearer token.
  2. API token — long-lived token from the user profile; also sent as Bearer for plugins that prefer token paste.
  3. Device flow — plugin shows a user code; user confirms in the browser; plugin polls until a token is issued.

Password login and OAuth browser callbacks are used by the first-party web app. Plugin authors should use device flow or API tokens, not scrape website login forms.

Versioning

All documented routes live under /main/api/v1. Breaking changes are introduced with a new version prefix when required. Additive fields in JSON responses should be tolerated by clients.