API Reference — Overview

← Back to Platform Architecture

API Reference — Overview

Design Philosophy

The Stratum Platform API follows REST conventions with the following core principles:
  • Multi-Tenant Isolation — All endpoints filter queries by tenant_id from AuthContext. Cross-tenant access is forbidden.
  • Immutable Versioning — Updates never overwrite existing data. Version snapshots are stored immutably; rollback is always possible.
  • PHI Guard — Requests with PHI (SSN, MRN, phone, email) are rejected at middleware before reaching route handlers (422).
  • SUD Compliance — Substance Use Disorder data (42 CFR Part 2) has special sharing restrictions; cannot be exported with ?deidentify=true without attorney review.
  • Audit Everything — All data access and modification events are logged with user_id, tenant_id, timestamp, and event type for HIPAA compliance.
  • Credit Integration — Query costs (marketplace access) deduct from tenant balance via event-sourced ledger; no credit = 402 Payment Required.
  • API Versioning

    Current Version: v1 Pattern: Endpoints use /api/ prefix without explicit version number (implicitly v1). Future Versioning Strategy (Roadmap):