{"openapi":"3.1.0","info":{"title":"AuraOS plugin API","version":"1.0.0","description":"Track time and counts into AuraOS. The guide: https://auraos.app/developers/guide.md. Rate limit: 300 requests a minute per connection."},"servers":[{"url":"https://auraos.app/api/v1"}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A personal token (aura_pat_…) or an OAuth access token (aura_at_…)."},"oauth":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://auraos.app/oauth/authorize","tokenUrl":"https://auraos.app/api/oauth/token","refreshUrl":"https://auraos.app/api/oauth/token","scopes":{"activity":"Log time and counts for its own activities, and change or delete what it logged","summary":"See the levels, XP and habits its activities feed","record:read":"Read your whole time log, including time from the app and other apps","record:write":"Change or delete any entry in your time log"}}},"description":"Public clients with PKCE (S256). Refresh tokens rotate on every use."}}},"paths":{"/me":{"get":{"summary":"Who the token acts for","security":[{"bearer":[]},{"oauth":["activity"]},{"oauth":["summary"]}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"additionalProperties":false},"app":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},"scopes":{"type":"array","items":{"type":"string"}},"timeZone":{"type":["string","null"]},"dayStartHour":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"today":{"type":"string"}},"required":["user","app","scopes","timeZone","dayStartHour","today"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/activities":{"get":{"summary":"Your app's activities","security":[{"bearer":[]},{"oauth":["activity"]},{"oauth":["summary"]}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"activities":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":"string","enum":["growth","work","maintenance","rest","drain"],"description":"What kind of time it was. Only growth and work earn XP."},"unit":{"type":["string","null"]},"mapped":{"type":"boolean","description":"Whether the person has chosen where it counts. Entries are kept either way and count once it is mapped."}},"required":["key","label","description","kind","unit","mapped"],"additionalProperties":false}}},"required":["activities"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"summary":"Declare activities (idempotent)","security":[{"bearer":[]},{"oauth":["activity"]}],"parameters":[{"name":"dryRun","in":"query","schema":{"type":"boolean"},"description":"Check the write without saving anything."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"activities":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$","description":"Your stable key for the activity, e.g. \"sound-design\".","example":"sound-design"},"label":{"type":"string","minLength":1,"maxLength":60,"description":"What people see, e.g. \"Sound design\".","example":"Sound design"},"description":{"description":"One line shown when someone chooses where it counts.","type":"string","maxLength":300},"kind":{"description":"The usual kind of its time (default growth). An entry can override it.","type":"string","enum":["growth","work","maintenance","rest","drain"]},"unit":{"description":"The usual unit of its counts, e.g. \"tracks\".","type":"string","minLength":1,"maxLength":32}},"required":["key","label"],"additionalProperties":false}}},"required":["activities"],"additionalProperties":false}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"activities":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"description":{"type":["string","null"]},"kind":{"type":"string","enum":["growth","work","maintenance","rest","drain"],"description":"What kind of time it was. Only growth and work earn XP."},"unit":{"type":["string","null"]},"mapped":{"type":"boolean","description":"Whether the person has chosen where it counts. Entries are kept either way and count once it is mapped."}},"required":["key","label","description","kind","unit","mapped"],"additionalProperties":false}}},"required":["activities"],"additionalProperties":false}}}},"400":{"description":"Invalid request (see error.details)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited; wait Retry-After seconds","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/entries":{"get":{"summary":"Entries in a date range","security":[{"bearer":[]},{"oauth":["activity"]},{"oauth":["record:read"]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"},"description":"At most 366 days after from."},{"name":"activity","in":"query","schema":{"type":"string"}},{"name":"all","in":"query","schema":{"type":"boolean"},"description":"Every item, not just yours (needs record:read)."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":500}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The previous page's next."}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Your id for it; null for entries made in AuraOS or by another app.","type":["string","null"]},"auraId":{"type":"string","description":"AuraOS's own id. Use /entries/aura:{auraId} for entries that aren't yours (needs record:write)."},"app":{"description":"The app that made it, or null if made in AuraOS.","type":["string","null"]},"activity":{"type":["string","null"]},"date":{"type":"string","description":"The habit day it counts on."},"start":{"description":"Local start time, HH:MM, in the person's time zone.","type":["string","null"]},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"note":{"type":["string","null"]},"kind":{"type":"string","enum":["growth","work","maintenance","rest","drain"],"description":"What kind of time it was. Only growth and work earn XP."},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Goes up with every change, wherever it was made. Send it back in If-Match or expectedVersion."},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","auraId","app","activity","date","start","durationMinutes","title","note","kind","details","version","createdAt","updatedAt"],"additionalProperties":false}},"next":{"type":["string","null"]}},"required":["entries","next"],"additionalProperties":false}}}},"400":{"description":"Invalid request (see error.details)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Create or update up to 500 entries by your ids","security":[{"bearer":[]},{"oauth":["activity"]}],"parameters":[{"name":"dryRun","in":"query","schema":{"type":"boolean"},"description":"Check the write without saving anything."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"entries":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Your own id for this item. Sending the same id again updates it instead of adding another, so retries are safe.","example":"session-8f2c"},"activity":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$","description":"The key of one of your declared activities.","example":"sound-design"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"An ISO 8601 date-time with a time zone offset or Z. AuraOS works out the habit day from the person's own time zone and day start.","example":"2026-11-09T21:10:00+01:00"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"A habit day, YYYY-MM-DD, when there is no exact time.","example":"2026-11-09"},"durationMinutes":{"type":"integer","minimum":1,"maximum":1440,"description":"How long, in whole minutes (1–1440).","example":45},"title":{"description":"Shown in the time log. Defaults to the activity's label.","type":"string","minLength":1,"maxLength":200},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"kind":{"description":"Defaults to the activity's kind.","type":"string","enum":["growth","work","maintenance","rest","drain"]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Anything else worth keeping, as a JSON object (at most 4 KB). Stored and shown, never interpreted.","example":{"project":"Track 4","bpm":128}},{"type":"null"}]},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Only write if the item is still at this version (0: only if it doesn't exist yet). Otherwise the item comes back as a conflict."}},"required":["id","activity","durationMinutes"],"additionalProperties":false}}},"required":["entries"],"additionalProperties":false}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"status":{"type":"string","enum":["created","updated","unchanged","conflict","invalid"]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false},"entry":{"description":"The item as saved, or for a conflict, as it is now.","type":"object","properties":{"id":{"description":"Your id for it; null for entries made in AuraOS or by another app.","type":["string","null"]},"auraId":{"type":"string","description":"AuraOS's own id. Use /entries/aura:{auraId} for entries that aren't yours (needs record:write)."},"app":{"description":"The app that made it, or null if made in AuraOS.","type":["string","null"]},"activity":{"type":["string","null"]},"date":{"type":"string","description":"The habit day it counts on."},"start":{"description":"Local start time, HH:MM, in the person's time zone.","type":["string","null"]},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"note":{"type":["string","null"]},"kind":{"type":"string","enum":["growth","work","maintenance","rest","drain"],"description":"What kind of time it was. Only growth and work earn XP."},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Goes up with every change, wherever it was made. Send it back in If-Match or expectedVersion."},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","auraId","app","activity","date","start","durationMinutes","title","note","kind","details","version","createdAt","updatedAt"],"additionalProperties":false}},"required":["id","status"],"additionalProperties":false}}},"required":["dryRun","results"],"additionalProperties":false,"description":"One result per entry, in order."}}}},"400":{"description":"Invalid request (see error.details)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited; wait Retry-After seconds","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/entries/{id}":{"get":{"summary":"One entry","security":[{"bearer":[]},{"oauth":["activity"]},{"oauth":["record:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Your id, or aura:<auraId> for an item that is not yours."}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Your id for it; null for entries made in AuraOS or by another app.","type":["string","null"]},"auraId":{"type":"string","description":"AuraOS's own id. Use /entries/aura:{auraId} for entries that aren't yours (needs record:write)."},"app":{"description":"The app that made it, or null if made in AuraOS.","type":["string","null"]},"activity":{"type":["string","null"]},"date":{"type":"string","description":"The habit day it counts on."},"start":{"description":"Local start time, HH:MM, in the person's time zone.","type":["string","null"]},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"note":{"type":["string","null"]},"kind":{"type":"string","enum":["growth","work","maintenance","rest","drain"],"description":"What kind of time it was. Only growth and work earn XP."},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Goes up with every change, wherever it was made. Send it back in If-Match or expectedVersion."},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","auraId","app","activity","date","start","durationMinutes","title","note","kind","details","version","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"No such item","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Change some fields","security":[{"bearer":[]},{"oauth":["activity"]},{"oauth":["record:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Your id, or aura:<auraId> for an item that is not yours."},{"name":"If-Match","in":"header","schema":{"type":"string"},"description":"The version you last saw, e.g. \"3\". The write fails with 409 if it has changed since."},{"name":"dryRun","in":"query","schema":{"type":"boolean"},"description":"Check the write without saving anything."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"activity":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$","description":"The key of one of your declared activities.","example":"sound-design"},"startedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"An ISO 8601 date-time with a time zone offset or Z. AuraOS works out the habit day from the person's own time zone and day start.","example":"2026-11-09T21:10:00+01:00"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"A habit day, YYYY-MM-DD, when there is no exact time.","example":"2026-11-09"},"durationMinutes":{"type":"integer","minimum":1,"maximum":1440,"description":"How long, in whole minutes (1–1440).","example":45},"title":{"description":"Shown in the time log. Defaults to the activity's label.","type":"string","minLength":1,"maxLength":200},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"kind":{"description":"Defaults to the activity's kind.","type":"string","enum":["growth","work","maintenance","rest","drain"]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Anything else worth keeping, as a JSON object (at most 4 KB). Stored and shown, never interpreted.","example":{"project":"Track 4","bpm":128}},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Your id for it; null for entries made in AuraOS or by another app.","type":["string","null"]},"auraId":{"type":"string","description":"AuraOS's own id. Use /entries/aura:{auraId} for entries that aren't yours (needs record:write)."},"app":{"description":"The app that made it, or null if made in AuraOS.","type":["string","null"]},"activity":{"type":["string","null"]},"date":{"type":"string","description":"The habit day it counts on."},"start":{"description":"Local start time, HH:MM, in the person's time zone.","type":["string","null"]},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"note":{"type":["string","null"]},"kind":{"type":"string","enum":["growth","work","maintenance","rest","drain"],"description":"What kind of time it was. Only growth and work earn XP."},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Goes up with every change, wherever it was made. Send it back in If-Match or expectedVersion."},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","auraId","app","activity","date","start","durationMinutes","title","note","kind","details","version","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request (see error.details)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"No such item","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Version mismatch; error.details.current is the item now","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete it","security":[{"bearer":[]},{"oauth":["activity"]},{"oauth":["record:write"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Your id, or aura:<auraId> for an item that is not yours."},{"name":"If-Match","in":"header","schema":{"type":"string"},"description":"The version you last saw, e.g. \"3\". The write fails with 409 if it has changed since."},{"name":"dryRun","in":"query","schema":{"type":"boolean"},"description":"Check the write without saving anything."}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"No such item","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Version mismatch; error.details.current is the item now","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/counts":{"get":{"summary":"Counts in a date range","security":[{"bearer":[]},{"oauth":["activity"]},{"oauth":["record:read"]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","format":"date"},"description":"At most 366 days after from."},{"name":"activity","in":"query","schema":{"type":"string"}},{"name":"all","in":"query","schema":{"type":"boolean"},"description":"Every item, not just yours (needs record:read)."},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":1000,"default":500}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"The previous page's next."}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"counts":{"type":"array","items":{"type":"object","properties":{"id":{"description":"Your id for it; null for another app's count.","type":["string","null"]},"auraId":{"type":"string"},"app":{"type":["string","null"]},"activity":{"type":["string","null"]},"date":{"type":"string"},"at":{"type":["string","null"]},"value":{"type":"number"},"unit":{"type":["string","null"]},"note":{"type":["string","null"]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","auraId","app","activity","date","at","value","unit","note","details","version","createdAt","updatedAt"],"additionalProperties":false}},"next":{"type":["string","null"]}},"required":["counts","next"],"additionalProperties":false}}}},"400":{"description":"Invalid request (see error.details)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Create or update up to 500 counts by your ids","security":[{"bearer":[]},{"oauth":["activity"]}],"parameters":[{"name":"dryRun","in":"query","schema":{"type":"boolean"},"description":"Check the write without saving anything."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"counts":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[A-Za-z0-9._:-]+$","description":"Your own id for this item. Sending the same id again updates it instead of adding another, so retries are safe.","example":"session-8f2c"},"activity":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$","description":"The key of one of your declared activities.","example":"sound-design"},"value":{"type":"number","minimum":-1000000000000,"maximum":1000000000000,"description":"The number.","example":1},"unit":{"description":"Defaults to the activity's unit.","anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"An ISO 8601 date-time with a time zone offset or Z. AuraOS works out the habit day from the person's own time zone and day start.","example":"2026-11-09T21:10:00+01:00"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"A habit day, YYYY-MM-DD, when there is no exact time.","example":"2026-11-09"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Anything else worth keeping, as a JSON object (at most 4 KB). Stored and shown, never interpreted.","example":{"project":"Track 4","bpm":128}},{"type":"null"}]},"expectedVersion":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"Only write if the item is still at this version (0: only if it doesn't exist yet). Otherwise the item comes back as a conflict."}},"required":["id","activity","value"],"additionalProperties":false}}},"required":["counts"],"additionalProperties":false}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"dryRun":{"type":"boolean"},"results":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"status":{"type":"string","enum":["created","updated","unchanged","conflict","invalid"]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false},"count":{"description":"The item as saved, or for a conflict, as it is now.","type":"object","properties":{"id":{"description":"Your id for it; null for another app's count.","type":["string","null"]},"auraId":{"type":"string"},"app":{"type":["string","null"]},"activity":{"type":["string","null"]},"date":{"type":"string"},"at":{"type":["string","null"]},"value":{"type":"number"},"unit":{"type":["string","null"]},"note":{"type":["string","null"]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","auraId","app","activity","date","at","value","unit","note","details","version","createdAt","updatedAt"],"additionalProperties":false}},"required":["id","status"],"additionalProperties":false}}},"required":["dryRun","results"],"additionalProperties":false,"description":"One result per count, in order."}}}},"400":{"description":"Invalid request (see error.details)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"429":{"description":"Rate limited; wait Retry-After seconds","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/counts/{id}":{"get":{"summary":"One count","security":[{"bearer":[]},{"oauth":["activity"]},{"oauth":["record:read"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Your id, or aura:<auraId> for an item that is not yours."}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Your id for it; null for another app's count.","type":["string","null"]},"auraId":{"type":"string"},"app":{"type":["string","null"]},"activity":{"type":["string","null"]},"date":{"type":"string"},"at":{"type":["string","null"]},"value":{"type":"number"},"unit":{"type":["string","null"]},"note":{"type":["string","null"]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","auraId","app","activity","date","at","value","unit","note","details","version","createdAt","updatedAt"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"No such item","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Change some fields","security":[{"bearer":[]},{"oauth":["activity"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Your id, or aura:<auraId> for an item that is not yours."},{"name":"If-Match","in":"header","schema":{"type":"string"},"description":"The version you last saw, e.g. \"3\". The write fails with 409 if it has changed since."},{"name":"dryRun","in":"query","schema":{"type":"boolean"},"description":"Check the write without saving anything."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"activity":{"type":"string","pattern":"^[a-z0-9][a-z0-9._-]{0,63}$","description":"The key of one of your declared activities.","example":"sound-design"},"value":{"type":"number","minimum":-1000000000000,"maximum":1000000000000,"description":"The number.","example":1},"unit":{"description":"Defaults to the activity's unit.","anyOf":[{"type":"string","minLength":1,"maxLength":32},{"type":"null"}]},"at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"An ISO 8601 date-time with a time zone offset or Z. AuraOS works out the habit day from the person's own time zone and day start.","example":"2026-11-09T21:10:00+01:00"},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"A habit day, YYYY-MM-DD, when there is no exact time.","example":"2026-11-09"},"note":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{},"description":"Anything else worth keeping, as a JSON object (at most 4 KB). Stored and shown, never interpreted.","example":{"project":"Track 4","bpm":128}},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"Your id for it; null for another app's count.","type":["string","null"]},"auraId":{"type":"string"},"app":{"type":["string","null"]},"activity":{"type":["string","null"]},"date":{"type":"string"},"at":{"type":["string","null"]},"value":{"type":"number"},"unit":{"type":["string","null"]},"note":{"type":["string","null"]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","auraId","app","activity","date","at","value","unit","note","details","version","createdAt","updatedAt"],"additionalProperties":false}}}},"400":{"description":"Invalid request (see error.details)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"No such item","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Version mismatch; error.details.current is the item now","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete it","security":[{"bearer":[]},{"oauth":["activity"]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"description":"Your id, or aura:<auraId> for an item that is not yours."},{"name":"If-Match","in":"header","schema":{"type":"string"},"description":"The version you last saw, e.g. \"3\". The write fails with 409 if it has changed since."},{"name":"dryRun","in":"query","schema":{"type":"boolean"},"description":"Check the write without saving anything."}],"responses":{"204":{"description":"Deleted"},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"404":{"description":"No such item","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"409":{"description":"Version mismatch; error.details.current is the item now","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/changes":{"get":{"summary":"Everything that changed since a cursor","security":[{"bearer":[]},{"oauth":["activity"]},{"oauth":["record:read"]}],"parameters":[{"name":"cursor","in":"query","schema":{"type":"string"},"description":"Leave out for a full sync."},{"name":"all","in":"query","schema":{"type":"boolean"},"description":"Changes to every entry (needs record:read)."}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"changes":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["entry","count"]},"op":{"type":"string","enum":["upsert","delete"]},"id":{"description":"Your id for it (null for items that are not yours).","type":["string","null"]},"auraId":{"type":"string"},"entry":{"type":"object","properties":{"id":{"description":"Your id for it; null for entries made in AuraOS or by another app.","type":["string","null"]},"auraId":{"type":"string","description":"AuraOS's own id. Use /entries/aura:{auraId} for entries that aren't yours (needs record:write)."},"app":{"description":"The app that made it, or null if made in AuraOS.","type":["string","null"]},"activity":{"type":["string","null"]},"date":{"type":"string","description":"The habit day it counts on."},"start":{"description":"Local start time, HH:MM, in the person's time zone.","type":["string","null"]},"durationMinutes":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"note":{"type":["string","null"]},"kind":{"type":"string","enum":["growth","work","maintenance","rest","drain"],"description":"What kind of time it was. Only growth and work earn XP."},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Goes up with every change, wherever it was made. Send it back in If-Match or expectedVersion."},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","auraId","app","activity","date","start","durationMinutes","title","note","kind","details","version","createdAt","updatedAt"],"additionalProperties":false},"count":{"type":"object","properties":{"id":{"description":"Your id for it; null for another app's count.","type":["string","null"]},"auraId":{"type":"string"},"app":{"type":["string","null"]},"activity":{"type":["string","null"]},"date":{"type":"string"},"at":{"type":["string","null"]},"value":{"type":"number"},"unit":{"type":["string","null"]},"note":{"type":["string","null"]},"details":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["id","auraId","app","activity","date","at","value","unit","note","details","version","createdAt","updatedAt"],"additionalProperties":false}},"required":["type","op","id","auraId"],"additionalProperties":false}},"cursor":{"type":"string"},"hasMore":{"type":"boolean"}},"required":["changes","cursor","hasMore"],"additionalProperties":false}}}},"400":{"description":"Invalid request (see error.details)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"410":{"description":"Cursor expired; sync from the start","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/summary":{"get":{"summary":"Time, counts, levels and habits per activity","security":[{"bearer":[]},{"oauth":["summary"]}],"responses":{"200":{"content":{"application/json":{"schema":{"type":"object","properties":{"today":{"type":"string"},"activities":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"mapped":{"type":"boolean"},"minutes":{"type":"object","properties":{"today":{"type":"number"},"last7Days":{"type":"number"},"last30Days":{"type":"number"},"allTime":{"type":"number"}},"required":["today","last7Days","last30Days","allTime"],"additionalProperties":false},"sessions":{"type":"number"},"counts":{"type":"object","properties":{"unit":{"type":["string","null"]},"today":{"type":"number"},"last7Days":{"type":"number"},"last30Days":{"type":"number"},"allTime":{"type":"number"}},"required":["unit","today","last7Days","last30Days","allTime"],"additionalProperties":false},"habit":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"doneToday":{"type":"boolean"}},"required":["name","doneToday"],"additionalProperties":false},{"type":"null"}]},"feeds":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["skill","attribute","identity"]},"name":{"type":"string"},"share":{"type":"number"},"level":{"type":"number"},"title":{"type":"string"},"xpMinutes":{"type":"number"},"progress":{"type":"number"}},"required":["type","name","share","level","title","xpMinutes","progress"],"additionalProperties":false}}},"required":["key","label","mapped","minutes","sessions","counts","habit","feeds"],"additionalProperties":false}}},"required":["today","activities"],"additionalProperties":false}}}},"401":{"description":"Missing, expired or revoked token","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"403":{"description":"The token lacks the scope","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"validation_failed"},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}}}