Yashveer Singh
Connect
<- All posts
Backend, APIs, and System Design12 min read

Designing an API That Customers Will Not Curse In Five Years

An API that customers will not curse in five years is the result of decisions made at week one. Stable shapes. Additive evolution. Consistent naming. Clear errors. Cursor based pagination. Versioning that respects existing integrations. The discipline is unglamorous. The result is an API that customers integrate once and keep using rather than tolerating.

Written by Yashveer Singh, founder of Yashveer Labs.

What you actually need to know

  • Consistency across endpoints is the single most important rule.
  • Additive evolution only after launch.
  • Cursor based pagination for growing lists.
  • Consistent error structure across all endpoints.
  • Versioning that respects existing integrations.
DecisionRight pattern
NamingConsistent. snake_case or camelCase. Same across endpoints.
PaginationCursor based on growing lists
ErrorsConsistent shape with type, message, request ID
AuthenticationAPI keys plus OAuth, picked deliberately
VersioningMajor in URL, additive minor
IDsOpaque strings, type prefixed
TimestampsISO 8601 UTC with Z suffix
MoneyInteger minor units, never floats

The core argument

An API is a contract that lives much longer than any individual feature. The customer integrates the API once. The integration runs for years. Every breaking change costs the customer engineering time. Every inconsistency costs the customer cognitive load. The API that customers love at year five is the API that respected the contract from year one.

The discipline is small at week one and accumulates value across years. Consistent field naming. Stable shapes. Additive evolution. Cursor based pagination from day one because adding it later requires a migration. Consistent error structure. Clear versioning. Each decision is a small one at week one. The combined effect is an API that customers integrate enthusiastically.

The mistakes are equally consistent. Designing the API for the first customer's specific use case. Inconsistent naming across endpoints. Offset based pagination on growing lists. Different error formats per endpoint. No versioning strategy. Each is small in isolation. The combined effect is an API that customers tolerate while they look for an alternative.

The teams that get this right invest two extra weeks at the start of the API project. Schema review with a senior engineer. Naming convention documented. Error format committed. Pagination strategy picked. Versioning policy documented. The two weeks compound across years of customer integrations.

The design choices that age well

ChoicePattern
URL designRESTful with plural nouns, kebab case
Field namingsnake_case or camelCase, picked once
IDsOpaque strings with type prefix
TimestampsISO 8601 UTC ending in Z
MoneyInteger cents, decimal currency separate
NullableExplicit null, not missing
EnumsStable string values
PaginationCursor based on growing lists
FilteringQuery parameters with documented operators
SortingSingle field, ascending default
Response envelopeConsistent. data, meta, errors.
Errorstype, message, request_id
Rate limitsHeaders on every response
IdempotencyIdempotency-Key header on writes

How much does this cost

InvestmentCost
Initial design reviewOne to two weeks
Documentation of conventionsDays
CI checks for consistencyDays
Schema reviews ongoingHours per change
Versioning infrastructureDays
Deprecation frameworkOne sprint

Features the API must have

  • A documented schema as the source of truth.
  • A versioning strategy.
  • A deprecation framework with timeline.
  • A changelog customers can read.
  • Consistent error structure.
  • Request ID on every response.
  • Rate limit headers on every response.
  • Idempotency support on write endpoints.
  • Backward compatibility commitment.

Expert opinion

The APIs that customers love five years after launch are the APIs that were designed for longevity from week one. The decisions are not exotic. Consistency. Stability. Additive evolution. Clear errors. The team that respects these from the start ships an API that compounds in value. The team that does not produces an API that customers complain about for the entire relationship.

>

Yashveer Singh, founder of Yashveer Labs

How this played out on a real project

A client SaaS had built their first public API quickly to land one specific customer. The API used inconsistent naming, offset based pagination, and three different error formats depending on which engineer wrote the endpoint. Customer integrations were painful.

We did not break the v1 API. We launched a v2 with strict design discipline. Consistent naming. Cursor based pagination. Single error format. Stable contract. Customers migrated over a year with full tooling support.

Three years later the v2 API has had zero breaking changes. New endpoints get added monthly with the same discipline. The customer integration cost is dramatically lower than v1. The customer satisfaction with the API has been the highest of any product surface.

For more on the related work, see building APIs that survive five years of customer change requests and the API versioning strategy that survives real world use.

Common mistakes teams make

  1. Designing for the first customer's use case.
  2. Inconsistent naming across endpoints.
  3. Offset based pagination on growing lists.
  4. Different error formats per endpoint.
  5. No versioning strategy.
  6. No changelog.
  7. No deprecation framework.
  8. Treating the API as solved once shipped.

A two week design exercise

  1. Days one to three. Pick conventions. Naming, IDs, timestamps, money, enums.
  2. Days four to six. Pick error structure. Pick pagination strategy.
  3. Days seven to nine. Draft schema for the first endpoints. Review with a senior engineer.
  4. Days ten to fourteen. Document conventions. Set up CI checks. Start the changelog.

For more on the related work, read building APIs that survive five years of customer change requests and pagination patterns cursor vs offset and why it matters. On the broader API side, API documentation that developers actually read is the natural next read.

FAQ

Frequently asked

Author

The engineering bet behind Yashveer Labs

The bet I am running with Yashveer Labs is simple. Most software is built by people who treat it as a job. I treat it as a craft. Yashveer Singh, founder. Five production systems on the board so far. The arc points at machine learning, AI engineering, and cybersecurity. If your project is in any of those orbits, you are reading the right page.

Related reading