Home

HTTP API

Every type gets the same REST endpoints, generated from the ontology.

Authentication

Send Authorization: Bearer arc_… with a token, or the session cookie the web app uses. Without either, requests get 401 with WWW-Authenticate: Bearer.

curl localhost:8080/api/receipt?limit=10 -H "Authorization: Bearer $TOKEN"

Errors

StatusWhen
400Bad JSON, a bad id or a bad parameter
401Not signed in, or an invalid or expired token
403Not allowed in that space, or a scoped token managing users
404Unknown type, object, file or source
409Conflicts, such as a change based on an old spec or a source already syncing
422Validation: {"type", "errors": [{"path", "message"}]}

Other errors are {"error": "…"}.

Objects

Lists are ordered by id, which is creation time. Page with after, the id of the last object on the previous page; limit is up to 1000 and defaults to 100.

curl -X POST "localhost:8080/api/receipt?space=household" -H "Authorization: Bearer $TOKEN" \
  -d '{"shop": "Albert Heijn", "date": "3 Oct 2026", "total": "€18,34"}'

Endpoints

MethodPathDoes
GET/api/typesThe spec, plus the names of built-in and edited built-in types
GET/api/types/<name>One type with its resolved fields, subtypes and JSON Schema
GET/api/changesProposed, applied and reverted changes, newest first
POST/api/changesPropose {"ops": […]}; returns the change
POST/api/changes/<id>/previewDry run: touched, failing, failures and samples
POST/api/changes/<id>/applyApply a proposed change
POST/api/changes/<id>/revertRevert an applied change
GET/api/<type>List objects of a type and its subtypes; field=value filters, limit, after, space, reveal=true
POST/api/<type>Create; ?space= picks the space
GET/api/<type>/<id>Read one object; reveal=true
PUT/api/<type>/<id>Replace the whole object
PATCH/api/<type>/<id>Set some fields; null clears a field
DELETE/api/<type>/<id>Delete with provenance and links
GET/api/<type>/<id>/provenanceProvenance per field
GET/api/<type>/<id>/linksLinks of the object
GET/api/searchSearch; see Search
GET/api/filesList files
POST/api/filesUpload a multipart file
GET/api/files/<id>File metadata
GET/api/files/<id>/contentFile bytes
GET/api/files/<id>/thumbnailImage thumbnail
GET/api/files/<id>/textExtracted text
POST/api/files/<id>/linkSigned link; ?expires=1h
POST/api/files/tusStart a tus upload; then HEAD, PATCH and DELETE on its Location
GET/api/sourcesList sources
POST/api/sourcesAdd a source; Google sources return auth_url
GET/api/sources/<id|name>One source
PATCH/api/sources/<id|name>Change type, schedule or rate
POST/api/sources/<id|name>/runSync now; returns fetched, new, mapped, status and error
DELETE/api/sources/<id|name>Remove a source
GET/api/sources/oauth/callbackGoogle OAuth redirect URI
GET/api/viewsSaved views
POST/api/viewsSave a view: name, space, type, layout (table, board, calendar), by, where
GET/api/views/<id>One view
PUT/api/views/<id>Replace a view
DELETE/api/views/<id>Delete a view

Sign-in and access

Scoped tokens cannot use the space, member and token endpoints; full tokens and sessions can.

MethodPathDoes
GET/auth/methodsSign-in providers and whether mail is set up; no sign-in needed
POST/auth/magicSend a magic link to {"email"}
GET/auth/magic?token=Use a magic link; sets the session cookie
GET/auth/setup?token=Open the first-run setup page
POST/auth/setupCreate the first owner: {"token", "email", "name"}
POST/auth/passkey/loginStart a passkey sign-in; then /auth/passkey/login/finish
POST/auth/passkey/registerStart adding a passkey; then /auth/passkey/register/finish
GET/auth/oidc/<provider>Sign in with an OIDC provider
GET/auth/meThe signed-in actor, their spaces and home space
POST/auth/signoutEnd the session
GET/auth/spacesYour spaces with your role
POST/auth/spacesAdd a space: {"name"}
GET/auth/spaces/<space>/membersMembers of a space
POST/auth/spaces/<space>/membersSet a role: {"email", "role"}; none removes
GET/auth/tokensYour tokens
POST/auth/tokensMake a token: {"name", "spaces", "expires", "full"}
DELETE/auth/tokens/<id>Revoke a token

Other routes

PathDoes
/healthz204 when the server is up
/files/<id>?exp=&sig=Signed file links
/mcpMCP over streamable HTTP; see MCP
/app/The web app; / redirects there