Developer API

Cronwatch API

Give any agent or script read-only access to your time-tracking data. Create an API key in the app, send it as a header, and query your structured time entries and weekly goals over HTTPS.

Base URL
api.cronwatch.xyz
Auth
X-Api-Key header
Access
Read-only

Quick start

  1. 1
    Create an API key
    Open Cronwatch on iOS → Profile API Keys → tap +. Name it (e.g. “My Claude Agent”) and tap Create. The full key — it starts with cw_ — is shown once. Copy it somewhere safe; it can't be recovered. API keys require an active subscription.
  2. 2
    Send your first request
    Pass the key in the X-Api-Key header on every request:
    curl https://api.cronwatch.xyz/v1/me \
      -H "X-Api-Key: cw_your_key_here"
  3. 3
    Query your entries
    Ask for any date range and reason over the structured blocks that come back — category, note, start, end.

Authentication

Every request must include your secret key in the X-Api-Key header. Keys begin with cw_. There are no scopes — a key grants read-only access to the entries and profile of the account that created it, and nothing else.

X-Api-Key: cw_your_key_here
  • Keep keys secret. Store them in an environment variable or secrets manager — never commit them to source control.
  • Lost or leaked a key? In the app, open the key's menu and tap Refresh (rotates it) or Delete. The old value stops working immediately.
  • A missing or malformed key returns 401 Unauthorized.

Endpoints

GET/v1/entries

List time entries that overlap a date window, ordered by start time ascending.

Query parameters

FieldTypeDescription
fromISO 8601Window start, compared against each entry's start time. Default: 7 days ago.
toISO 8601Window end. Default: now.
limitintegerMax entries to return, 1–500. Default: 200.

Entries that begin just before from but end inside the window (e.g. overnight sleep) are included.

Example request

curl https://api.cronwatch.xyz/v1/entries \
  -H "X-Api-Key: cw_your_key_here" \
  -G \
  --data-urlencode "from=2026-01-01T00:00:00Z" \
  --data-urlencode "to=2026-01-31T23:59:59Z" \
  --data-urlencode "limit=500"

Example response

json
{
  "entries": [
    {
      "id": "c_1737014400000_a1b2c3",
      "captureId": "c_1737014400000_a1b2c3",
      "category": "work",
      "note": "API architecture review",
      "startTime": "2026-01-16T09:00:00.000Z",
      "endTime":   "2026-01-16T10:30:00.000Z",
      "source": "voice",
      "transcript": "Spent ninety minutes on the API architecture…",
      "createdAt": "2026-01-16T10:31:22.000Z"
    }
  ],
  "count": 1
}

Entry fields

FieldTypeDescription
idstringUnique entry identifier.
captureIdstringID of the voice capture this entry came from. Falls back to id.
categorystringActivity category, e.g. work, admin, rest.
notestringShort human-readable summary of the block.
startTimeISO 8601When the block started (UTC).
endTimeISO 8601When the block ended (UTC).
sourcestringHow the entry was created, e.g. voice.
transcriptstring | nullOriginal voice transcript, when available.
createdAtISO 8601When the entry was recorded.
GET/v1/me

Return the account's profile and weekly goals.

Example request

curl https://api.cronwatch.xyz/v1/me \
  -H "X-Api-Key: cw_your_key_here"

Example response

json
{
  "uid": "8f2c…",
  "goals": [
    { "category": "work", "weeklyTargetHours": 20 },
    { "category": "rest", "weeklyTargetHours": 14 }
  ]
}

Errors

Errors return a non-2xx status and a JSON body of the form { "error": "message" }.

StatusMeaning
400Bad requestInvalid from / to date, or from is not before to.
401UnauthorizedMissing, malformed, or unknown API key.
500Server errorSomething went wrong on our side — retry.

Use it with an AI agent

Cronwatch ships a ready-made agent skill — a single Markdown file describing the API in the format Claude Code and other coding agents understand. Drop it into your agent and it learns how to read your time on its own.

Install in Claude Code

Save the file as a skill, then add your key as an environment variable so it never lives in the prompt:

# Add the skill to your project (or ~/.claude/skills)
mkdir -p .claude/skills/cronwatch
curl -fsSL https://cronwatch.xyz/skill.md \
  -o .claude/skills/cronwatch/SKILL.md

# Make your key available to the agent
export CRONWATCH_API_KEY="cw_your_key_here"

Or paste a system prompt

For a Claude project, an assistant, or any LLM with tool/HTTP access, paste this into the system prompt (swap in your key):

You have access to the user's Cronwatch time-tracking data.
Base URL: https://api.cronwatch.xyz
Authentication: send header  X-Api-Key: cw_your_key_here

Endpoints:
  GET /v1/me                          — weekly goals & profile
  GET /v1/entries?from=ISO&to=ISO     — time entries in a date range

When the user asks about their time, habits, schedule, or goal
progress, call the relevant endpoint and reason over the results.
Times are ISO 8601 (UTC). Never log or echo the API key.