{"openapi":"3.1.0","info":{"title":"Cronus AI API","version":"1","description":"Read and edit your own Cronus AI data. Inside /api/v1 fields and endpoints are only added: a field is never removed, renamed or retyped, so ignore fields you do not know. Times are ISO 8601 in UTC, durations are milliseconds. Fields marked nullable are null for data captured before they existed. Human docs: https://cronushq.com/docs/api"},"servers":[{"url":"https://cronus-server.fly.dev/api/v1"}],"security":[{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A key from Settings → Integrations → API (crn_…)."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"CategoryRef":{"type":["object","null"],"properties":{"id":{"type":"string"},"name":{"type":"string"},"productive":{"type":"boolean"}},"required":["id","name","productive"],"additionalProperties":false},"Category":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":["string","null"]},"color":{"type":["string","null"]},"emoji":{"type":["string","null"]},"productive":{"type":"boolean"},"archived":{"type":"boolean"},"groupId":{"type":["string","null"]}},"required":["id","name","description","color","emoji","productive","archived","groupId"],"additionalProperties":false},"Me":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":["string","null"]},"name":{"type":["string","null"]},"timeZone":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}}},"required":["id","email","name","timeZone","scopes"],"additionalProperties":false},"Categories":{"type":"object","properties":{"categories":{"type":"array","items":{"$ref":"#/components/schemas/Category"}}},"required":["categories"],"additionalProperties":false},"DailyStats":{"type":"object","properties":{"timeZone":{"type":"string"},"days":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"totalMs":{"type":"integer"},"productiveMs":{"type":"integer"},"unproductiveMs":{"type":"integer"},"uncategorizedMs":{"type":"integer"},"switchCount":{"type":"integer"},"byCategory":{"type":"array","items":{"type":"object","properties":{"category":{"$ref":"#/components/schemas/CategoryRef"},"totalMs":{"type":"integer"}},"required":["category","totalMs"],"additionalProperties":false}}},"required":["date","totalMs","productiveMs","unproductiveMs","uncategorizedMs","switchCount","byCategory"],"additionalProperties":false}}},"required":["timeZone","days"],"additionalProperties":false},"DayStats":{"type":"object","properties":{"date":{"type":"string"},"timeZone":{"type":"string"},"totalMs":{"type":"integer"},"productiveMs":{"type":"integer"},"unproductiveMs":{"type":"integer"},"uncategorizedMs":{"type":"integer"},"switchCount":{"type":"integer"},"byCategory":{"type":"array","items":{"type":"object","properties":{"category":{"$ref":"#/components/schemas/CategoryRef"},"totalMs":{"type":"integer"}},"required":["category","totalMs"],"additionalProperties":false}},"byActivity":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["app","website"]},"identifier":{"type":"string"},"manual":{"type":"boolean"},"category":{"$ref":"#/components/schemas/CategoryRef"},"totalMs":{"type":"integer"},"summary":{"type":["string","null"]},"reasoning":{"type":["string","null"]}},"required":["name","type","identifier","manual","category","totalMs"],"additionalProperties":false}}},"required":["date","timeZone","totalMs","productiveMs","unproductiveMs","uncategorizedMs","switchCount","byCategory","byActivity"],"additionalProperties":false},"Blocks":{"type":"object","properties":{"timeZone":{"type":"string"},"blocks":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"id":{"type":"string"},"manualEntryId":{"type":["string","null"]},"start":{"type":"string"},"end":{"type":"string"},"durationMs":{"type":"integer"},"link":{"type":"string"},"name":{"type":"string"},"app":{"type":"string"},"title":{"type":["string","null"]},"summary":{"type":["string","null"]},"type":{"type":"string","enum":["app","website"]},"manual":{"type":"boolean"},"category":{"$ref":"#/components/schemas/CategoryRef"},"activities":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"type":{"type":"string","enum":["app","website"]},"identifier":{"type":"string"},"durationMs":{"type":"integer"},"category":{"$ref":"#/components/schemas/CategoryRef"}},"required":["name","type","identifier","durationMs","category"],"additionalProperties":false}}},"required":["date","id","manualEntryId","start","end","durationMs","link","name","app","title","summary","type","manual","category","activities"],"additionalProperties":false}}},"required":["timeZone","blocks"],"additionalProperties":false},"Intervals":{"type":"object","properties":{"timeZone":{"type":"string"},"intervals":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"start":{"type":"string"},"end":{"type":"string"},"durationMs":{"type":"integer"},"link":{"type":"string"},"app":{"type":"string"},"bundleId":{"type":["string","null"]},"name":{"type":"string"},"type":{"type":"string","enum":["app","website"]},"identifier":{"type":"string"},"title":{"type":["string","null"]},"url":{"type":["string","null"]},"documentUrl":{"type":["string","null"]},"manual":{"type":"boolean"},"manualEntryId":{"type":["string","null"]},"category":{"$ref":"#/components/schemas/CategoryRef"},"categorizedBy":{"type":"string","enum":["auto","manual","override","user"]},"summary":{"type":["string","null"]},"reasoning":{"type":["string","null"]}},"required":["id","start","end","durationMs","link","app","bundleId","name","type","identifier","title","url","documentUrl","manual","manualEntryId","category","categorizedBy","summary","reasoning"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["timeZone","intervals","nextCursor"],"additionalProperties":false},"Event":{"type":"object","properties":{"id":{"type":"string"},"at":{"type":"string"},"link":{"type":"string"},"app":{"type":"string"},"bundleId":{"type":["string","null"]},"type":{"type":"string","enum":["window","browser","system","manual"]},"browser":{"type":["string","null"]},"title":{"type":["string","null"]},"url":{"type":["string","null"]},"documentUrl":{"type":["string","null"]},"device":{"type":"string","enum":["mac","phone"]},"category":{"$ref":"#/components/schemas/CategoryRef"},"summary":{"type":["string","null"]},"reasoning":{"type":["string","null"]},"screenText":{"type":["string","null"]}},"required":["id","at","link","app","bundleId","type","browser","title","url","documentUrl","device","category","summary","reasoning"],"additionalProperties":false},"Events":{"type":"object","properties":{"timeZone":{"type":"string"},"events":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"nextCursor":{"type":["string","null"]}},"required":["timeZone","events","nextCursor"],"additionalProperties":false},"Now":{"type":"object","properties":{"asOf":{"type":"string"},"timeZone":{"type":"string"},"state":{"type":"string","enum":["no_data","asleep","locked","active","stale"]},"lastEventAt":{"type":["string","null"]},"ageMs":{"type":["integer","null"]},"event":{"anyOf":[{"$ref":"#/components/schemas/Event"},{"type":"null"}]},"uploadDelayMs":{"type":["integer","null"]}},"required":["asOf","timeZone","state","lastEventAt","ageMs","event","uploadDelayMs"],"additionalProperties":false},"Memories":{"type":"object","properties":{"memories":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"text":{"type":"string"},"source":{"type":"string"},"useCount":{"type":"integer"},"lastUsedAt":{"type":["string","null"]},"feedback":{"type":["string","null"]},"evidence":{"type":["object","null"],"properties":{"app":{"type":"string"},"title":{"type":["string","null"]},"at":{"type":["string","null"]},"excerpt":{"type":["string","null"]}},"required":["app","title","at"],"additionalProperties":false},"dream":{"type":["object","null"],"properties":{"kind":{"type":"string"},"evidence":{"type":"array","items":{}},"days":{"type":"integer"}},"required":["kind","evidence","days"],"additionalProperties":false},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","text","source","useCount","lastUsedAt","feedback","evidence","dream","createdAt","updatedAt"],"additionalProperties":false}}},"required":["memories"],"additionalProperties":false}}},"paths":{"/me":{"get":{"summary":"The account, its time zone and the key’s scopes.","description":"Scope: any.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"4XX":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/categories":{"get":{"summary":"Every category, including archived ones.","description":"Scope: any.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Categories"}}}},"4XX":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/stats/daily":{"get":{"summary":"Per-day totals and time per category.","description":"Scope: stats.","parameters":[{"name":"from","in":"query","required":false,"description":"First local date, YYYY-MM-DD. Defaults to today.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Last local date, inclusive. Defaults to `from`.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyStats"}}}},"4XX":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/stats/day":{"get":{"summary":"One day with time per activity. Summaries need `activity`.","description":"Scope: stats.","parameters":[{"name":"date","in":"query","required":false,"description":"Local date, YYYY-MM-DD. Defaults to today.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DayStats"}}}},"4XX":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/blocks":{"get":{"summary":"Calendar blocks as Cronus AI draws them.","description":"Scope: activity.","parameters":[{"name":"from","in":"query","required":false,"description":"First local date, YYYY-MM-DD. Defaults to today.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"Last local date, inclusive. Defaults to `from`.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Blocks"}}}},"4XX":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/intervals":{"get":{"summary":"Closed spans in an app or on a site. The activity in progress is not here until the next event closes it; see /now.","description":"Scope: activity.","parameters":[{"name":"from","in":"query","required":false,"description":"A local date, an ISO timestamp or epoch milliseconds. Defaults to the start of today.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"A local date (inclusive of the whole day), an ISO timestamp or epoch milliseconds.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Default 200, at most 1000.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Intervals"}}}},"4XX":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/events":{"get":{"summary":"Every captured window switch, oldest first. Screen text needs `screen_text`.","description":"Scope: activity.","parameters":[{"name":"from","in":"query","required":false,"description":"A local date, an ISO timestamp or epoch milliseconds. Defaults to the start of today.","schema":{"type":"string"}},{"name":"to","in":"query","required":false,"description":"A local date (inclusive of the whole day), an ISO timestamp or epoch milliseconds.","schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"description":"Rows per page. Default 200, at most 1000.","schema":{"type":"string"}},{"name":"cursor","in":"query","required":false,"description":"The `nextCursor` of the previous page.","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Events"}}}},"4XX":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/now":{"get":{"summary":"The newest window event and whether it is still current. `active` means an event within the last 5 minutes; `asleep` and `locked` mean the Mac reported that and nothing since; `stale` means silence for more than 5 minutes.","description":"Scope: activity.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Now"}}}},"4XX":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/memories":{"get":{"summary":"What Cronus AI has learned about your work.","description":"Scope: memories.","parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Memories"}}}},"4XX":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}