LogiShell docs Open app

HTTP API and its gates

Everything under /api/* on app.logishell.com is served by one worker. The table below is not written by hand: it is rendered from the route registry that lives next to the code (apps/ui/src/routes.manifest.ts), and a test fails the build when the worker routes on a path the registry does not know. Prefixes, not every route: /api/repos also covers /api/repos/<id>/tree. A path belongs to the longest prefix that covers it, so /api/llm/status is public while /api/llm/complete is not.

Three ways in

  1. Session. The browser cookie you get after signing in. This is the door for a person at a screen.
  2. Owner machine token. Authorization: Bearer <APP_M2M_TOKEN>. There is one token per deployment and it always acts as the deployment owner; a wrong bearer is a 401, never a silent fall back to the cookie.
  3. Both. Routes marked both accept either: a bearer when one is presented, the session otherwise. This is how the runner on your machine, the LOG cube on the desktop and the owner MCP door reach the same API.

The owner MCP door talks to this API with the machine token, so it sees exactly the groups marked m2m, both and admin. The personal MCP door runs inside the same worker and calls the handlers directly with the identity of your OAuth token; there is no fourth way in.

Route groups

<!-- api-doc:start -->

prefixgatewhat
/apipublicCatch-all for API paths this deployment does not serve: answers 503 not_deployed instead of the SPA shell.
/api/achievementssessionAchievements shelf and claims; the founder counter (/founders, /early) is public because the landing has no session.
/api/adminadminAdmin LOG: notes queue (/notes), founders list and game publish tokens; the MCP owner door reads and closes notes through the same gate.
/api/admin/me (GET)publicAnswers whether the current session is an admin; an anonymous caller gets {admin:false}, not 401.
/api/agent-grantssessionRevocable links that hand one agent to another person; only the owner mints and revokes them.
/api/agent-guestguest-tokenThe receiving side of an agent grant: the token opens one agent on one machine, never /api/agents or the organization.
/api/agentssessionConversational agents shelf and their turns; no m2m on purpose, a turn spends on behalf of the owner.
/api/askbothQuestions to people and agents; which door answered decides whether you may answer your own question.
/api/assistantbothLOG assistant chat and durable turns (/turn); m2m lets the desktop cube ask without an IDE window open.
/api/authpublicBetter Auth endpoints (sign-in, session, OAuth); /providers lists what this door offers, mail routes are rate limited.
/api/auth/handoff (POST)publicSign-in handoff to another cookie jar (desktop window): /start and /redeem work without a session by design.
/api/auth/handoff/approve (POST)sessionApproves a handoff code; only a signed-in session can do it, because that session is what gets handed over.
/api/boardbothKanban board cards and columns; the owner m2m door lets MCP tools move cards.
/api/booksessionBook of rules: types, rules and handle for the person behind the cookie.
/api/canvasbothWhiteboard canvases, personal to the caller; m2m lets LOG draw without a browser.
/api/cardsessionThe QR business card of the signed-in person.
/api/channelbothPersonal publishing channel and its posts.
/api/consentsessionConsent records of the signed-in person.
/api/ctxbothShared memory: contexts, topics, sessions, companion; the runner writes run traces here with the owner m2m token.
/api/diagnostic (POST)publicDiagnostic report ingest from the desktop; no session, because the first breakages happen before sign-in.
/api/diskbothDisk storage next to repos, behind the same two doors as /api/repos.
/api/e (POST)publicProduct event ingest; a user id is attached only from a verified session, never from the body.
/api/feedback/embed (POST, OPTIONS)publicSubmit-only feedback widget door; the project id grants no read access and the Origin must be on the project allowlist.
/api/gamespublicGames showcase: the catalog is public, publishing needs the author Bearer publish token minted by an admin.
/api/github/starsessionTracks whether the signed-in person starred the repo.
/api/github/star/webhook (POST)webhook-hmacGitHub star webhook, verified with GITHUBSTARWEBHOOK_SECRET (sha256 HMAC).
/api/handwritten-notesbothHandwritten notes captured from paper and their recognized text.
/api/integrationsbothConnected integrations of the caller (MCP servers, services) and their approvals.
/api/internalinternalSaved-link capture worker on the node: claims, uploads and gc behind SAVEDLINKWORKER_TOKEN.
/api/interpretationsbothLibrary interpretations of saved links and notes.
/api/islandsessioniPhone Live Activity island: which machine to follow, searched across all spaces of the person.
/api/labssessionLabs: published labs are readable without a session, writes resolve the cookie authoritatively.
/api/landing-sessionpublicOne-bit credentialed CORS bridge for the landing: signed in or not, false for an anonymous visitor rather than 401.
/api/library/searchbothSearch across the Library of the caller.
/api/llmbothLLM facade: complete, stream, routed and platform completions, usage and gateway receipts; the brain, keys and limits are chosen on the server.
/api/llm/status (GET)publicNames which brains this deployment offers and carries no secret.
/api/marketsessionCompute market orders of the signed-in person.
/api/netsessionNetwork graph of people and organizations around the caller.
/api/networksessionNetwork editorial: the public page of a subject and its publication, behind the same door as the profile.
/api/nodesbothPaired machines (device relay): list, pair, settings and proxy; delivery control under /proxy/delivery needs the m2m door, a cookie is not enough.
/api/nodes/connect (GET)publicThe machine door: a headless node dials out with its pair code or per-device token in X-LB-Node-* headers, no cookie exists.
/api/note-sourcesbothSources of handwritten notes (scans, photos) and their upload.
/api/notesbothNotes and the why-journal; m2m lets the local MCP door record decisions.
/api/notificationssessionIn-app notifications: list, create and mark read.
/api/orgssessionOrganizations of the signed-in person, served by the Network handler.
/api/profilesessionProfile of the signed-in person: what they show to others.
/api/pushsessionWeb push: public key, subscribe and unsubscribe for the signed-in browser.
/api/recent-tabsbothRecently opened tabs of the caller, synced across surfaces.
/api/recordingsbothRun and screen recordings; the runner uploads them with the owner m2m token because a terminal process has no cookie.
/api/reposbothRepositories: tree, files and git, proxied to the repo service with the caller stamped in.
/api/roomsbothAgent rooms, the executing side of a topic; an agent without a browser enters with the owner m2m token.
/api/saved-linksbothSaved links of the Library: save, tag, open, retry capture and delete.
/api/searchsessionBuilt-in LogiShell Search of the browser tab; behind the session so it is not an open proxy from our domain.
/api/services/brainssessionOwner side of hosted brains: create, key and revoke; agents reach /brains/:id/mcp with a key the owner minted.
/api/sessionssessionDevice Center: the sessions of the signed-in person, read authoritatively from the database and revocable.
/api/sharepublicShare links to clips: GET peeks and POST redeems without any account, PUT (create) and DELETE (revoke) need a session.
/api/slatebothSlate documents and their artifacts.
/api/storesessionStore: listings, purchases and the earn-only $LSH ledger of the signed-in person.
/api/surfacesbothSurfaces composed from bricks, saved per caller.
/api/talksessionMessenger: connect, people, search, calls, room links and attachments (/files) for the signed-in person.
/api/talk/calls/status (GET)publicWhether this deployment can call (hub, rooms, attachments, ICE, relay); carries no secret, the UI hides dead buttons by it.
/api/talk/guestguest-tokenGuest by link into a call room; what the guest may do next is decided by the guest boundary in TalkHub.
/api/themessessionThemes shelf: browsing works without a session, applying and publishing answer 401 inside themesApi.
/api/timebothTime tracking entries of the caller.
/api/vaultsessionPersonal vault proxied to the vault worker; the worker itself trusts only the stamp this gate adds.
/api/voicesessionVoice: realtime session tokens for the signed-in person.

Gates:

66 groups. A path belongs to the longest prefix that covers it. <!-- api-doc:end -->

Not on this page

Routes outside /api (/healthz, /mcp, /.well-known/*), an OpenAPI document and per-route methods. Those come with the next step of the same slice.