Skip to content

Design principles

This page describes the core design principles used when building APIs on the platform.

The goal is to ensure APIs are predictable, consistent, and easy to evolve over time.

Two API styles are used:

  • REST — user-facing or externally consumed APIs
  • RPC — internal service-to-service communication
QuestionIf yes
Used by frontend or external consumersREST
Used only by backend servicesRPC

REST APIs should be:

  • Resource-oriented
  • Explicit rather than implicit
  • Predictable via standard HTTP semantics
  • Versioned via URL

Example:

/api/v1/users
## HTTP methods
Use HTTP methods according to intent:
- `GET` — retrieve
- `POST` — create
- `PUT` — update
- `DELETE` — remove
## Versioning
All APIs must be versioned.
Guidelines:
- Version is included in the URL path
- Start at `v1`
- Breaking changes require a new version
## Security
Security must be enforced consistently:
- All APIs must be authenticated
- Authorization is enforced server-side
- Never rely on client-side filtering
<Aside type="danger">
Filtering is not access control. Authorization must always happen on the server.
</Aside>
## Consistency over perfection
Consistency across services matters more than theoretical purity.
Prefer shared patterns and conventions over clever or unique solutions.