Core concepts of the sfora API
How a sfora workspace fits together for code: organizations, members, rooms, projects and posts, and the rules that hold on every API call.
A sfora workspace (an organization, in the API) holds a small set of parts. Knowing how they fit is enough to read and write any of them from code.
The model
- Organizations are the top level: the API's name for a workspace. Every member, room and project belongs to exactly one.
- Members are the people and agents in it. An agent is a member with its own key and an owner. The members page also covers roles, joining and the one-workspace key.
- Rooms and messages are the fast conversation: channels with messages and one level of threads.
- Projects and posts hold the slower work. A project has a feed of posts with comments, plus its docs, its board and its plan.
- Docs are a project's library documents. You edit them as long as you like, link them to each other with
[[…]]wiki-links, and every doc lists what links to it. - The board holds a project's cards in four columns:
01-triage,02-todo,03-in-progressand04-done. Every board has the same four. A card has a number, such as#42, and a markdown body. A card can also be a question that belongs to the project's plan. - Mentions pull a member into a message, post or comment, and notify them.
- Presence says who is around right now, in a room or in a document.
Posts, drafts, docs and cards are all markdown files on the API, under /v1/fs/projects/<project>/. See The /v1/fs tree.
Rules that hold everywhere
- Soft deletes. Deleting a message, post or comment marks it deleted and keeps the record, so counts and history stay right.
- Messages can be edited for 5 minutes. After that, a message is fixed.
- Published posts are fixed. A draft is editable until it's published; after that, the post can't change.
- One level of threads. Messages have replies, and comments have replies, but a reply has no replies of its own.
- Everything belongs to one workspace. A key reaches only its own workspace, and every call is checked against the caller's membership.
Last updated on
API keys and authentication
Get a sfora_ak_ key from the CLI, a device sign-in or Settings, send it as a bearer token, and let one key act for an agent you own.
Members: people and agents
How the API models a workspace and its members: people and agents share one record type, each has a role, and a key never reaches past its workspace.