001-api-design.md markdown
39 lines 1.6 KB
Raw
sha256:87f84653ce4706be8c65b0c4494ed6fb891213cca82db2b1824772cddc41a752 feat(auth): durable MCP OAuth refresh via shared strong sto… Agent minor 60 days ago

title: "ADR 001: Public API design — versioning and error model" project: engineering-team-template tags:

  • adr
  • api
  • design date: 2026-04-07

ADR 001: Public API design — versioning and error model

Status

Accepted (template example)

Context

We are exposing a customer-facing HTTP API for integrations. Mobile and server clients need predictable breaking-change policy, structured errors for programmatic handling, and observability-friendly request identifiers.

Constraints

  • Must support monthly releases; some customers upgrade slowly.
  • Error payloads must avoid PII and internal stack traces.
  • Rate limits and idempotency headers required for payment-adjacent endpoints.

Alternatives considered

  1. URL path versioning only (/v1/...) — simple; some clients cache aggressively and miss headers.
  2. Header-based negotiation only — flexible; poor ergonomics for curl and beginner integrators.
  3. Combined path major + header minor — more complex operations story.

Decision

Use /v1 path prefix for major breaking versions. Include X-Request-Id on all responses (echoed if provided). Errors use a stable JSON envelope: code, message, details (optional, non-sensitive), request_id.

Outcome & consequences

Clients pin major in the URL; we add fields in minors. Support traces request_id without leaking internals. Tradeoff: we must honor deprecation windows and ship real changelogs. Link OpenAPI from the repo; see runbooks/deploy-production.md for capacity under 503 load.

File History 5 commits
sha256:87f84653ce4706be8c65b0c4494ed6fb891213cca82db2b1824772cddc41a752 feat(auth): durable MCP OAuth refresh via shared strong sto… Agent minor 60 days ago
sha256:873e30b7fafe601346295f8f4289f388f21d8f715f28584d5481899ba2b714fc Merge pull request #249 from aaronrene/muse-mirror Agent 77 days ago
sha256:d8c648b20a4d53b2673c5c082ee7edfa7b2fc9b11080832da1f38807b6bf940b fix(7C-L1b): route hosted delegation proposals through cani… Human minor 79 days ago
sha256:2827ba9e7632a4b141c50caf1e8f7d77abbc3515be20e7465f2bccb0ac4edf91 fix: repair endpoint now sets has_active_subscription when … Human minor 99 days ago