API Contract

A formal specification of an API (OpenAPI, gRPC proto, GraphQL schema) that producers and consumers agree to uphold.

What is API Contract?

An API contract turns an interface from tribal knowledge into a versioned artifact. It enables client-generated code, compatibility checks in CI, and consumer-driven contract tests. For inter-team coordination it is one of the highest-leverage documentation pieces an architecture can own.

Related terms

  • Event Channel — A named, typed stream of events (often Kafka topic or equivalent) through which services publish and subscribe asynchronously.
  • Microservices — An architectural style that structures an application as a collection of small, independently deployable services organized around business capabilities.

Learn more