Skip to content

HTTP API for the team, access, boxes and history

These routes serve onboarding, team administration, computers and History. Every route here is on the people socket. A route marked admin answers 403 to a member. gomoe.dev signs people in natively, with AGENTS_AUTH=native, and instances and checks run in Tailscale mode by default. A route that answers in one mode only says so.

Method Path What it does
GET /v1/me Says who is calling and writes nothing. kind is member, invited or waiting.
POST /v1/me/join Joins the team of the login’s open invite, or records the login as wanting to join when it has none. With native sign-in it takes every open invite to the account’s email once the email is checked.
POST /v1/me/macs Adds the person’s own Mac. The Mac sends its token’s hash, so the token never reaches the server. Answers with the machine port and laptopApi, the laptop door’s address, which is https://gomoe.dev/machine on gomoe.dev and null on a server with no door.
POST /v1/invites Makes an invite from an email and a role. With native sign-in the server emails a one-time link, valid 7 days. In Tailscale mode Tailscale emails a tailnet invite when a Tailscale key is saved. Admin.
POST /v1/invites/<id>/resend Sends an invite again. With native sign-in the new email retires the old link. Admin.
POST /v1/invites/<id>/cancel Cancels an invite. Admin.
GET /v1/invites/<id>/link Reads an invite’s Tailscale link. With native sign-in it answers 409, since the link is only in the email. Admin.
POST /v1/team/people Adds a login that asked to join, or in Tailscale mode a tailnet user, to the team. Admin.

Each person reads and changes only their own settings. No agent has a tool for them.

Method Path What it does
GET /v1/me/notices Reads the kinds of notice the person gets, from approval, answer, stopped, finished and stuck, whether their phone gets them, and link, the ntfy address their phone subscribes to, or null before phone notices first turn on.
PUT /v1/me/notices Changes kinds, phone or both. The first time phone turns on, it makes the person’s topic, 128 random bits, kept after.
POST /v1/me/notices/test Sends the person’s phone Agents: Test notice, or, given as with an agent and a kind, what that kind would send for one of their agents. Answers 409 while the phone is off, 404 for an agent they don’t own, and 502 when ntfy doesn’t take it.

These routes answer only with native sign-in, as on gomoe.dev. In Tailscale mode they answer 404 with this server signs people in through Tailscale, and teams are made by its operator. Looking up and declining a link need only its token. Every other route here needs a fully signed-in session. An account whose email is not checked takes no invite, makes no team and asks no team.

Method Path What it does
GET /v1/me/joining Reads what the no-team page shows: open invites to the account’s checked email, the requests it waits on, and how many teams it made of the 3 it may make.
POST /v1/invite-links/look Reads the invite a link’s token names: the team, who invited, the role and the email.
POST /v1/invite-links/accept Joins the team of the link’s invite as the signed-in account.
POST /v1/invite-links/decline Declines the link’s invite.
POST /v1/me/invites/<id>/accept Accepts an open invite to the account’s email.
POST /v1/me/invites/<id>/decline Declines an open invite to the account’s email.
POST /v1/me/requests/<id>/cancel Cancels a request to join that the account made.
POST /v1/teams Makes a team from a name and a key. The maker is its admin.
GET /v1/keys/<key> Says whether a team key is free. Counts toward the lookup limit.
POST /v1/teams/by-key/<key>/join Asks the team with that key to let the account in, under the team’s join policy. Counts toward the lookup limit.
GET /v1/team/door Reads the team’s key, its join policy and the keys held for it.
POST /v1/team/key Changes the team’s key. The old one is held for 90 days. Admin.
POST /v1/team/join-policy Sets the join policy, request, domain, invite_only or org_members, and the email domains for domain. Admin.

The routes under /v1/auth/ sign a person up, in and out, and manage their sessions, passkeys, authenticator, password and recovery codes. They answer only with native sign-in, and server/auth-routes.ts, server/passkeys.ts, server/oauth.ts, server/account-settings.ts and server/desktop-sign-in.ts hold them. This page does not list them yet.

These routes act on a tailnet through the Tailscale API, so they answer only on a server with AGENTS_TAILSCALE_API and AGENTS_TAILSCALE_KEY_FILE set. The routes don’t check the sign-in mode, and the settings belong to a server in Tailscale mode, as instances and checks are. gomoe.dev sets neither. There GET /v1/tailscale answers {"state": "off"}, and every other route here answers 409 with Tailscale is off on this server.

Method Path What it does
GET /v1/tailscale Reads whether Tailscale is on and the saved key’s last four characters. Admin.
POST /v1/tailscale/key Saves the Tailscale API key, with its expiry. Admin.
POST /v1/tailscale/key/delete Removes the saved key. Admin.
GET /v1/tailscale/users Lists the tailnet’s users, read from Tailscale each time. Admin.
POST /v1/tailscale/users/<id>/approve Approves a tailnet user. Admin.
POST /v1/tailscale/users/<id>/suspend Suspends a tailnet user. Admin.
POST /v1/tailscale/users/<id>/restore Restores a tailnet user. Admin.
POST /v1/tailscale/users/<id>/delete Deletes a tailnet user. Admin.
POST /v1/tailscale/users/<id>/role Sets a tailnet user’s role. Admin.
GET /v1/tailscale/devices Lists the tailnet’s devices. Admin.
POST /v1/tailscale/devices/<id>/authorize Authorizes a device. Admin.
POST /v1/tailscale/devices/<id>/delete Deletes a device. Admin.
GET /v1/tailscale/invites Lists the tailnet’s invites. Admin.
POST /v1/tailscale/invites/<id>/resend Sends a tailnet invite again. Admin.
POST /v1/tailscale/invites/<id>/cancel Cancels a tailnet invite. Admin.
Method Path What it does
GET /v1/team/claude-token Reads whether the team’s Claude token is saved, and when it ends. Admin.
POST /v1/team/claude-token Saves the team’s Claude token with valid_days. leaked: true revokes the boxes’ tokens. Admin.
POST /v1/team/claude-token/delete Removes the token. The body must confirm. Admin.
GET /v1/warnings Lists the warnings for the person, such as a token that is about to end.
GET /v1/setup Lists the setup steps and where each stands.
GET /v1/team/webmcp-origins Lists the sites whose WebMCP tools the team’s agents may use.
POST /v1/team/webmcp-origins Lists one more origin. Admin.
POST /v1/team/webmcp-origins/<id>/delete Removes an origin from the list. Admin.
Method Path What it does
POST /v1/me/box Makes the person’s own box if they have none. A person has at most one.
POST /v1/me/claude-login Starts the person’s own sign-in to Claude on their box. Answers loginId.
POST /v1/claude-logins/<id>/code Sends the code the person got from Claude to the box.
POST /v1/claude-logins/<id>/cancel Cancels a sign-in.
POST /v1/instances/<id>/claim Keeps a box for the person. A person’s own box, a coding computer and a computer a task, a chat or the warm pool holds cannot be claimed.
POST /v1/instances/<id>/release Gives a claimed box back to the pool.
POST /v1/screens/<id>/take Takes over the screen of a box’s first seat. The body names the sessionId the person was looking at.
POST /v1/screens/<id>/hand-back Hands the screen of a box’s first seat back to the agents.
POST /v1/screens/<id>/seats/<number>/take Takes over the screen of one seat.
POST /v1/screens/<id>/seats/<number>/hand-back Hands one seat’s screen back to the agents.
Method Path What it does
GET /v1/history Lists the sessions the person may see. Filters are agent, person, kind, project, repo, since and until. kind is conversation, task, run or terminal. before is the cursor of the next page and limit is 1 to 100, 30 by default.
GET /v1/search Searches the steps of those sessions for q, at most 300 characters. scope is all, messages, tools or errors. It takes the same filters, before and limit.
GET /v1/history/sessions/<id> Reads one session for a replay.
GET /v1/history/summary A plain summary as finished text in answer: one session’s lines with session_id, an agent’s latest 30 sessions of the last 24 hours with agent, by name, or a UTC day’s latest 30 with day, YYYY-MM-DD. A session past 50 lines says how many earlier lines it has. Give exactly one, or it answers 400. Each line names its step.
GET /v1/history/sessions/<id>/steps Reads a range of a session’s steps. from and to are step numbers of 1 or more, to is at least from, and a range holds at most 100 numbers.
GET /v1/export Streams History as newline-delimited JSON, with the same filters as the list. The answer is a download.
GET /v1/usage Says what agents cost in the sessions the person may see, between from and to, two UTC days given as YYYY-MM-DD, both included. A range holds at most 366 days. by is agent, person, day, source or model. What agents cost says what the numbers mean.
GET /v1/downloads/mac Says whether the server has the Mac app to give out, and as release which build it is and its release notes, from the file a release writes beside the zip, or null when nothing says.

<kind> is playbooks or rules. Everyone on the team reads. Drafts, publishing, sharing and importing are an admin’s.

Method Path What it does
GET /v1/team/<kind> Reads what sessions load, the server’s default, every version, the publishes and, for an admin, the share links.
GET /v1/team/<kind>/versions/<id or default> Reads a version’s files.
GET /v1/team/<kind>/versions/<id or default>/export Downloads a version as a zip in the plugin shape.
GET /v1/team/<kind>/read Reads the version in use as an agent’s read_playbooks does, or one file with file.
POST /v1/team/<kind>/drafts Makes a draft from from: default, current or a version id. Admin.
PUT /v1/team/<kind>/drafts/<id>/files/<path> Writes one file of a draft from text, with base, the draft’s tree hash when it was opened. Admin.
DELETE /v1/team/<kind>/drafts/<id>/files/<path>?base=<tree> Removes one file of a draft. Admin.
GET /v1/team/<kind>/drafts/<id>/diff Reads a draft against what sessions load, file by file.
DELETE /v1/team/<kind>/drafts/<id> Discards a draft. Admin.
POST /v1/team/<kind>/versions/<id>/publish Publishes a version, or approves a second admin’s waiting publish of it. Admin.
POST /v1/team/<kind>/publishes/<id>/withdraw Withdraws a waiting publish. Admin.
PUT /v1/team/<kind>/settings Sets publishNeeds to 1 or 2 admins. Admin.
POST /v1/team/<kind>/versions/<id>/share Makes a 30-day link to a published version. Admin.
POST /v1/team/<kind>/import Imports a zip, sent as its bytes with x-file-name, or a share link in link, as a draft. Admin.
DELETE /v1/playbook-shares/<id> Revokes a share link. Admin.
POST /v1/playbook-shares/<id>/renew Renews a share link for 30 days. Admin.
GET /v1/shared-playbooks/<token> Reads a shared version. Anyone signed in on the server.

Billing is an admin’s. Stripe’s webhook takes no session: it acts only on a body whose Stripe-Signature verifies. See Bill teams through Stripe.

Method Path What it does
GET /v1/team/billing Reads the Stripe mode, the account the team is billed on and its subscription’s status, this month’s hours sent from the usage ledger, the hours not yet taken and the last reconciliation. Admin.
POST /v1/billing/stripe-webhook Stripe’s events. Refuses 400 a body with no signature, one signed with another secret, one older than 5 minutes or one changed after signing, and answers 404 when the server has no Stripe key. Acts on each event id once.