Skip to content

API overview

Everything in Homestead goes through one API. The web app, the phone app, the Firefox companion and AI agents all call the same REST endpoints. There’s no private back door for the app.

  • Base path: /api/v1 on your Homestead, for example http://localhost:8080/api/v1.
  • Format: JSON, except media uploads (multipart/form-data) and a few companion uploads.
  • Spec: api/openapi.yaml, OpenAPI 3.1, title “Homestead API”, version 1.0.0. It’s the source of truth: the Go server, the TypeScript client and the Dart client are generated from it.
  • Versioning: within v1, changes are additive. Breaking changes would need /api/v2.

The spec groups operations under these tags: system, auth, household, platforms, people, accounts, circles, shares, feed, media, agents, sources, extension and ai.

It also uses four vendor extensions:

ExtensionMeaning
x-min-roleMinimum member role: viewer, member or owner
x-required-scopesAgent token scopes needed. Absent means agent tokens are refused.
x-publicNo authentication needed
x-capture-uploadAccepts the short-lived hsu_ upload token of one capture

Agents can also use the MCP server at /mcp (Streamable HTTP), with the same agent token in an Authorization header. It has 19 tools, 3 resources and 3 prompts. Each tool maps to exactly one REST operation and runs the same code, with inputs generated from the OpenAPI schemas so they can’t drift. MCP isn’t part of the OpenAPI file; see the MCP reference.

For clients that only launch stdio servers, homestead mcp-stdio --url URL --token hst_… bridges stdio to /mcp.

ClientAuthNotes
Web app (same origin)Session cookie hs_session plus an X-CSRF-Token header on writesSign in with POST /auth/login and "client": "web"
Phone appAuthorization: Bearer hsd_… device tokenFrom sign-in with "client": "device", or QR pairing
Firefox companionhsd_… device token of kind extensionPaired with POST /auth/pair and "client": "extension"
Homestead Helperhsu_… capture upload tokenOne capture, 10 minutes, asset uploads only
Agents and scripts (REST)Authorization: Bearer hst_… agent token with scopesCreated on the Agents screen or with homestead token create
Agents (MCP)The same agent token, as a header to /mcpTools the token can’t use aren’t listed

Details in Authentication.

The health endpoint needs no authentication:

Terminal window
curl http://localhost:8080/api/v1/health
{"status":"ok","version":"dev"}