Developers

The ingest API

The same HTTP API the official plugins use. Write a plugin for an editor we do not support, or send time from a script. Field names follow WakaTime's snake_case. An editor that already has a WakaTime plugin needs no code at all: see WakaTime plugins.

Every path is on https://inlinr.com. Hover a field name in an example to read what it means. The same reference for a code generator or an AI assistant: OpenAPI and Markdown.

On this page

1. Get a device token

Each editor on each machine is its own device, with its own token, revocable from Settings. There are no account-wide API keys. Start a device sign-in, show the user the link, and poll until they approve it with GitHub:

POST/api/auth/device

Content-Type: application/json

{ : "my-plugin", : "vscode", : "linux" }

200

{
  : "…",
  : "ABCD-1234",
  : "https://inlinr.com/activate",
  : "https://inlinr.com/activate?code=ABCD-1234",
  : 900,
  : 5
}

POST/api/auth/device/token

Content-Type: application/json

{ : "…" }

400Not approved yet. Poll again after interval seconds.

{ : "authorization_pending" }

400The code expired. Start again.

{ : "expired_token" }

200Approved. Keep the token.

{ : "in_d_…", : { … }, : { … } }

Send the token as Authorization: Bearer in_d_… on every call below. POST /api/auth/device/revoke with the same header signs the device out.

2. Send heartbeats

A heartbeat says “this file was active at this time”. Send one about every two minutes of activity per file, plus one on each save. Durations are computed on the server from consecutive beats, so never send a duration. Up to 1000 beats per request.

POST/api/v1/heartbeats

Authorization: Bearer 
Content-Type: application/json

[
  {
    : "src/routes/index.tsx",
    : 1734523920.123,
    : "git@github.com:you/app.git",
    : "file",
    : "coding",
    : "typescript",
    : "main",
    : false,
    : 42,
    : 1023,
    : 180,
    : 14,
    : 2,
    : "copilot",
    : 12,
    : 1,
    : "vscode",
    : "1.99.3",
    : "my-plugin/0.1.0"
  }
]

200

{ : [[{ : "hb_0" }, 201]], : 1 }

Heartbeat fields

entityRequired
File path relative to the repository, a URL or an app name.string · 1–2,000 chars
timeRequired
Unix seconds; fractions are kept.number · > 0
project_git_remote
The repository's remote. The project is created or found from it. This or project is required.string · 1–500 chars
project
Instead of project_git_remote, for a folder with no git remote: its name, matched to a project by name. Only the last path segment is kept.string · ≤ 500 chars
type
What entity names."file" | "app" | "domain" · default "file"
category
What the time was spent on. Other values are kept and shown as sent."coding" | "debugging" | "building" | "code-reviewing" | "writing-tests" | "ai-coding" | string · nullable · ≤ 64 chars
is_write
true when the beat comes from a save.boolean · default false
lines_addedlines_deleted
Lines added and removed since the previous beat. 0 means none; leave them out if you do not count.integer · nullable · ≥ 0
ai_tool
The assistant that wrote the change. Send it only when you saw the assistant edit; any other value is rejected."copilot" | "cursor" | "claude-code" | "codeium" | "windsurf" | "aider" | "codex" | "gemini-cli" | "opencode" · nullable
ai_lines_addedai_lines_deleted
The part of those line counts the assistant wrote.integer · nullable · ≥ 0
ai_session
One assistant conversation, as the assistant names it.string · nullable · ≤ 128 chars
ai_model
The model the assistant used.string · nullable · ≤ 128 chars
ai_input_tokensai_output_tokensai_cache_read_tokensai_cache_write_tokens
Token counts: uncached input, output, and the context read from and written to the prompt cache, which bill at different rates.integer · nullable · 0–1e12
editor
The host editor, e.g. vscode, cursor, windsurf.string · nullable · ≤ 64 chars
editor_version
The host editor's version. In a VS Code fork, the VS Code build it embeds.string · nullable · ≤ 32 chars
plugin
Your client, user-agent style: name/version.string · nullable · ≤ 128 chars
branch
The git branch.string · nullable · ≤ 256 chars
language
The file's language. Inferred from the file name if left out.string · nullable · ≤ 64 chars
linenocursorposlines
The cursor's line and offset, and the file's line count. Accepted for WakaTime compatibility, not stored.integer · nullable · ≥ 0

Status codes

  • 200Stored. The responses array has one entry per beat, in order, so you can drop exactly what was accepted from your queue.
  • 400Malformed. Do not retry the same payload.
  • 401The token is missing or revoked. Ask the user to sign in again.
  • 5xxOr a network error: keep the beats and retry later.

3. Commit line counts (optional)

Counts only, read from git log --numstat on the machine: no commit message, no author email. Up to 1000 commits per request.

POST/api/v1/commits

Authorization: Bearer 
Content-Type: application/json

{
  : "git@github.com:you/app.git",
  : [
    {
      : "9f2c1ab",
      : "2026-10-14T09:12:00Z",
      : 3,
      : 120,
      : 14
    }
  ]
}

200New commits stored, and commits already known with no line counts filled in.

{ : 1, : 0 }

200No heartbeat has created this project yet. Not worth retrying.

{ : 0, : "unknown project" }

4. Your time and upgrades

For a status bar clock: time tracked today in the user's own time zone, with the same counting rule as the dashboard.

GET/api/v1/me/today

Authorization: Bearer 

200

{
  : 12840,
  : 214,
  : […],
  : […]
}

A period's totals, by project and language, and the time, lines and cost of AI assistants, as the AI usage page shows them. period takes the dashboard's presets (today, 7d, month…) or custom with from and to; project takes a project name or its git remote.

GET/api/v1/me/summary?period=7d&project=acme-app

Authorization: Bearer 

200400 ambiguous_project when two of your projects share the name; use the git remote.

{
  "period": "Last 7 days",
  "since": "2026-10-09T00:00:00.000Z",
  "until": null,
  "project": "acme-app",
  "total_seconds": 44940,
  "by_project": [
    { : "acme-app", : 44940, "ai_seconds": 9120 }
  ],
  "by_language": [{ : "typescript", : 38100 }],
  "ai": {
    : 9120,
    "sessions": 14,
    "lines_added": 1820,
    "total_lines_added": 2410,
    "tokens": { … },
    "cost_usd": 18.42,
    "unpriced_tokens": 0,
    "prices_verified_on": "2026-10-01",
    "by_tool": […]
  }
}

Logs a manual entry. Only minutes is required (1 to 1440). type is one of meeting, call, review, doc, research, testing, email or custom (the default), and started_at defaults to that many minutes ago.

POST/api/v1/me/entries

Authorization: Bearer 
Content-Type: application/json

{
  : 45,
  : "meeting",
  : "Kick-off",
  : true,
  : "acme-app"
}

201400 invalid_entry names the field that is wrong.

{
  : "cm…",
  "type": "meeting",
  "label": "Kick-off",
  "started_at": "2026-10-15T09:15:00.000Z",
  "minutes": 45,
  "billable": true,
  "project": "acme-app"
}

What to upgrade in the projects whose dependencies you follow, in the order of the Upgrades tab: security first, then deprecated packages, majors and the rest, each from the version your range starts at to the one to move to, with the page that says what changes.

GET/api/v1/me/upgrades?project=acme-app

Authorization: Bearer 

200dev=0 leaves dev dependencies out; limit goes up to 200 (50 by default).

{
  "project": "acme-app",
  "followed_projects": 3,
  "counts": { "security": 1, : 0, "major": 2, "minor": 14 },
  "truncated": false,
  "upgrades": [
    {
      : "next",
      : "security",
      "from": "15.0.3",
      "to": "15.0.7",
      "latest": "16.4.3",
      "dev": false,
      : null,
      : [
        { : "GHSA-…", "summary": "…", "severity": "HIGH" }
      ],
      "unfixed": false,
      "projects": [
        { : "acme-app", "range": "^15.0.3", "kind": "prod" }
      ],
      : "https://inlinr.com/packages/next/upgrade/15.0.3-15.0.7"
    },
    …
  ]
}

5. Package releases

What the public package pages say, as JSON, for a script, a bot or an AI agent: an npm package's releases with their notes and advisories, what changes between two of its versions, and a check of a whole package.json. No token needed. Scoped names go in the path as they are: /api/v1/packages/@tanstack/react-router/releases.

GET/api/v1/packages/react/releases?limit=1

No body.

200

{
  : "react",
  : "19.2.0",
  : null,
  "license": "MIT",
  "repository_url": "https://github.com/facebook/react",
  "homepage": "https://react.dev/",
  : "2026-10-15T08:00:00.000Z",
  : false,
  : [
    {
      "version": "19.2.0",
      : "2026-10-01T16:00:00.000Z",
      : false,
      : "## 19.2.0 …",
      : "https://github.com/facebook/react/releases/tag/v19.2.0"
    }
  ],
  : []
}

limit goes up to 100, since takes an ISO date, and prereleases=1 keeps release candidates. Leave to out of an upgrade to go to the latest release:

GET/api/v1/packages/react/upgrade?from=18.3.1&to=19.0.0

No body.

200

{
  : "react",
  : "19.2.0",
  : "2026-10-15T08:00:00.000Z",
  : false,
  "from": "18.3.1",
  "to": "19.0.0",
  : 1,
  : 1,
  : [],
  : [],
  : [
    { "version": "19.0.0", "markdown": "Remove propTypes …" }
  ],
  "deprecations": [],
  : [],
  : [],
  "security": [],
  "features": [{ "version": "19.0.0", "markdown": "Actions …" }],
  "fixes": [],
  "other": [],
  "internal_lines": 0,
  : [
    { "label": "React 19 upgrade guide", "url": "https://react.dev/…" }
  ]
}

404

{
  : "not_found",
  "message": "No published release 19.9.9 after 18.3.1."
}

POST/api/v1/check

Content-Type: application/json

{ : ["react@^18.2.0", "request"] }

200With a device token, each dependency also lists your_projects.

{
  "summary": {
    "checked": 2,
    "with_advisories": 1,
    : 1,
    "majors_behind": 1,
    "behind": 1,
    "unchecked": 0
  },
  "truncated": 0,
  : [
    {
      : "request",
      "range": null,
      "kind": "prod",
      "resolved_name": null,
      : "checked",
      "unchecked_reason": null,
      "latest": "2.88.2",
      : null,
      : null,
      : "request has been deprecated …",
      : [
        {
          : "GHSA-p8p7-x288-28g6",
          "summary": "…",
          "severity": "moderate",
          "url": "…",
          : null
        }
      ],
      "advisories_unknown": false
    }
  ]
}

Without a token, an address gets 60 reads and 10 checks every ten minutes. A device token raises that to 600 and 60, and each answer then lists your_projects: your own followed projects that declare the package, with the range and the installed version. Past the limit the answer is 429 with Retry-After. 503 busy means npm could not be read for a package we had never seen; try again in a minute. A range we cannot read, like workspace:*, is reported as unchecked, never as up to date.

AI assistants (MCP)

The same answers, inside Claude Code, Cursor, Claude Desktop or any MCP client: inlinr mcp serves them over stdio. Install the inlinr CLI, sign in once with inlinr activate, then add it to the assistant:

claude mcp add inlinr -- inlinr mcp

or, in a client's JSON config:

{ "mcpServers": { "inlinr": { "command": "inlinr", "args": ["mcp"] } } }

Its tools call the endpoints above: time_summary (your time by project and language, AI time and cost), log_time (a manual entry), check_dependencies (the package.json of the folder the assistant runs in; only its four dependency blocks are sent), package_releases, upgrade_notes, my_upgrades (your Upgrades list, from the endpoint above) and find_usages (the lines of your code that import a package, searched on your machine; nothing is sent). The package tools work without signing in.

WakaTime plugins

Any stock WakaTime plugin can send time here, unchanged. Create a WakaTime key in Settings → Editors (it starts with waka_), then point the plugin at inlinr in ~/.wakatime.cfg:

[settings]
api_url = https://inlinr.com/api/compat/wakatime/v1
api_key = waka_…

The key travels as HTTP Basic auth, the way wakatime-cli sends it. Projects are matched by name, or by one of a project's other names, since WakaTime plugins do not send a git remote, and the plugin's status bar shows today's time from inlinr. Setup for each editor is on the WakaTime integration page.

The same key reads what the tools around WakaTime read: users/current/summaries (start and end, or a named range such as Last 7 Days, and an optional project), users/current/stats/<range> (last_7_days, last_30_days, last_6_months, last_year, all_time) and users/current/all_time_since_today, in WakaTime's shapes. Operating systems, machines and dependencies come back empty: inlinr does not collect them. Moving over is in the switching guide. inlinr is not affiliated with or endorsed by WakaTime.

Before you write a client

The inlinr CLI already does sign-in, an offline queue and retries. Most plugins only spawn inlinr heartbeat with flags, which is how the VS Code extension works. How time is computed from beats is in this guide, and what we store is on the security page.