Guides
What a client needs to know before it calls the API, in the order to read it.
Start here
- How the API fits togetherEvery household is a separate workspace, every change to it is a command, and every shared read is a query.
- QuickstartGet a session, find your household, read with a query, change something with a command, and see what a rejection looks like.
- AuthenticationPeople sign in with Google and get a session cookie, and until personal API tokens exist, a script sends that same cookie.
Concepts
- Households and peopleA household is one family's workspace, and the people in it are not the same thing as the accounts that sign in.
- CommandsA command is the only way to change a household: one named action with a JSON input, run once and recorded with who made it.
- Queries and listsA query is a read with named inputs: a GET with flat query parameters that answers with JSON.
- Errors and retriesEvery error uses one envelope with a stable code to branch on, a message that says whether anything changed, and a recovery to try next.
- Sync and working offlineEvery device keeps a full copy of its household, queues what people do while offline, and catches up from a version number.
- The household socketOne WebSocket per household tells a client when to pull, shows who else is online and where, carries conversations with Rigel, and lets several people edit a document at once.
- FilesFiles are uploaded as raw bytes, stored once for the household, and linked to records by their ID.
- JobsWork that needs the network or a model runs after a command commits, and its results arrive as ordinary changes.
- Rigel, the agentRigel works through the same commands and queries you do, acts first and says what it did, asks before anything that can't be taken back, and can work on a schedule.
- Outside accountsA member connects a Google account in a browser, an app uses it for the household, and anyone in the household can disconnect it.
- EmailRigel has an inbox of its own. Mail forwarded to it is read and acted on, and mail goes out only from a draft that a person sends.
Formats
- IDs and formatsEvery ID, time, date, amount and field name in the API follows a few fixed formats, listed here.
- UnitsAmounts are a number and a unit from one fixed list, and the list only grows.
- VersioningThe API lives under /api/v1, and this reference is built from the code that is running.