Skip to main content

API routes


Core · API routes

Core principle — Make every endpoint a small, observable protocol rather than an arbitrary function behind a URL.
Stable methods, input validation, status codes, headers, errors, and cancellation.

Key concepts

Malformed JSON

400

Unauthorized

401

Forbidden

403

Boundary model

Ownership matrix

Engineering considerations

A clear HTTP contract lets clients, tests, proxies, and operators reason about behavior independently.
Design constraint An API is a promise about failure as much as it is a promise about success.

Implementation notes

Decision lens

References

Last modified on September 10, 2026