API reference
The OpenAPI 3.1 export will be written here in a later milestone and served at /docs. The typed
contracts already live in packages/capture-schema/src, and the
implemented behavior is recorded in openspec/specs/.
Current endpoints:
GET /v1/healthPOST /v1/auth/magic-linkGET /v1/auth/magic-link/verifyGET /v1/mereturnsuser,activeOrganization(nullable), and activememberships.GET /v1/organizationslists the session user’s active memberships.PUT /v1/organizations/activeselects an active membership with{ "organizationId": "…" }.GET /v1/memberslists active and inactive members of the selected organization (admin).POST /v1/membersadds an existing identity with{ "email": "…", "role": "reviewer" }(admin).PATCH /v1/members/:userIdchanges a member role with{ "role": "reviewer" }(admin).DELETE /v1/members/:userIddeactivates a membership (admin).POST /v1/auth/logoutGET /v1/townsPOST /v1/towns(admin session)GET /v1/parcelsPOST /v1/parcels(admin session)POST /v1/parcels/import(admin session; CSV text)GET /v1/api-keys(admin session)POST /v1/api-keys(admin session; raw key returned once)POST /v1/api-keys/:id/revoke(admin session)POST /v1/uploadsPOST /v1/capturesGET /v1/captures(accepts repeatedstatusvalues and an optionalqsearch term)GET /v1/captures/:idPOST /v1/captures/:id/resolve-parcel(reviewer session; existing or new parcel)POST /v1/captures/:id/review(reviewer session; accept, return, reject, request information)
Membership mutations return HTTP 204 on success. An unknown email or a disabled global user returns
HTTP 422. A request targeting an unavailable organization or a membership outside the session’s
selected organization returns HTTP 404. Last-administrator changes return HTTP 409. Roles are
admin, reviewer, and submitter; the submitter role is read-only and cannot review, resolve
parcels, export, or administer the organization. Tenant-scoped endpoints require an active
organization when using a reviewer session.