Skip to content

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/health
  • POST /v1/auth/magic-link
  • GET /v1/auth/magic-link/verify
  • GET /v1/me returns user, activeOrganization (nullable), and active memberships.
  • GET /v1/organizations lists the session user’s active memberships.
  • PUT /v1/organizations/active selects an active membership with { "organizationId": "…" }.
  • GET /v1/members lists active and inactive members of the selected organization (admin).
  • POST /v1/members adds an existing identity with { "email": "…", "role": "reviewer" } (admin).
  • PATCH /v1/members/:userId changes a member role with { "role": "reviewer" } (admin).
  • DELETE /v1/members/:userId deactivates a membership (admin).
  • POST /v1/auth/logout
  • GET /v1/towns
  • POST /v1/towns (admin session)
  • GET /v1/parcels
  • POST /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/uploads
  • POST /v1/captures
  • GET /v1/captures (accepts repeated status values and an optional q search term)
  • GET /v1/captures/:id
  • POST /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.