Core Concept

API Contract & Integration Design

How to shape the surface between services and clients — structured errors, idempotent mutations, pagination contracts, webhooks, long-running job APIs, auth scopes, and versioning policy — independent of whether you choose REST, GraphQL, or gRPC on the wire.


What:

The set of conventions that define how callers interact with your system beyond transport choice — request/response shapes, failure semantics, auth boundaries, and evolution rules.

Primary purpose:

Make integrations predictable for humans and machines: clients know how to retry, paginate, authenticate, and handle partial failures without tribal knowledge.

Usually used for:

Public REST/GraphQL products, B2B partner APIs, payment and booking flows, async job platforms, and webhook-driven event notifications.

Separate three layers in every API discussion:

📡 Transport

HTTP/2, gRPC, WebSocket — how bytes move. Covered in Network Protocols.

📜 Contract

Resources, fields, error codes, pagination tokens, idempotency rules — what callers may depend on.

🔌 Integration

Webhooks, batch imports, OAuth scopes, SLA headers — how external systems stay in sync over time.