API versioning is the practice of managing changes to a public API over time so existing clients don't break when the API evolves.
API versioning is the discipline of evolving a public API over time without breaking existing integrations. Once external clients depend on your API, breaking changes have real cost — customer engineering time, support load, churn risk. The versioning strategy determines how you communicate change, how clients opt in to new behavior, and how long you have to maintain old behavior in parallel. Stripe, Twilio, and GitHub have public writeups worth reading before choosing.
(1) URL versioning — /v1/customers, /v2/customers. Simple, explicit, easy to route. Common in REST APIs (GitHub, Twilio). Cost: v2 duplicates a lot of v1 in code unless you version internally too. (2) Header versioning — Accept: application/vnd.acme.v2+json. Cleaner URLs, but harder to test in a browser and easier for clients to forget. (3) Date-based versioning — Stripe-Version: 2024-06-20 header. Each date represents a snapshot of the entire API; clients pin to a date and receive that behavior indefinitely. More overhead for the API team but the smoothest client experience. Stripe's approach is the gold standard for high-value APIs where breakage is expensive.
Non-breaking (safe under any versioning): adding new endpoints, adding optional request parameters, adding new fields to responses (if clients ignore unknown fields), adding new enum values (if clients handle unknowns gracefully), relaxing validation. Breaking: removing endpoints or fields, renaming anything, changing types, changing default behavior, tightening validation, changing pagination semantics. Discipline: default all API design to backward-compatible; treat every breaking change as a real cost requiring explicit justification, not something to do casually.
When you must break, the deprecation runway matters. Standard practice: 6-12 months for public APIs with paying customers, 3-6 months for developer-preview APIs, 30 days for internal/private-beta APIs. During the window: emit deprecation warnings in response headers (Sunset: header per RFC 8594), send targeted emails to affected accounts, publish migration guides. Never remove without notice, even from small integrations — the reputation cost of surprise breakage is disproportionate to the maintenance savings.
Providing official SDKs (usually in TypeScript, Python, Ruby, Go, PHP) drastically reduces the pain of API changes — you can absorb complexity in the SDK layer and clients update by upgrading a dependency. But SDKs are a serious ongoing commitment: multi-language maintenance, release engineering, version compatibility matrices. Small teams often start with excellent OpenAPI specs and auto-generated SDKs, then invest in hand-crafted SDKs as scale justifies. Do not ship SDKs you can't maintain — abandoned SDKs poison developer trust.
Between services you control, versioning can be lighter — coordinated deploys, tolerant readers, and expand-contract patterns replace formal version numbers. Public APIs need the ceremony because you can't force clients to upgrade; internal APIs can often skip it because you can. Don't apply public-API versioning discipline to internal service boundaries — the overhead won't pay for itself.
Investor directory · Fundraising library · Articles A–Z · Company funding database