Kenneth Teh / Lead Engineer← Portfolio

Engineering note / API design

Design APIs for the people who will debug them at 2 a.m.

Clear contracts, stable reason codes, correlation identifiers, and actionable diagnostics are product features when integrations cross teams and markets.

Kenneth TehWorking model
01

The second audience for every API

The first audience is the client implementing the happy path. The second is the engineer, support specialist, or operator trying to explain a failure with incomplete context. Good API design serves both from the same contract.

02

Make failure a designed surface

Define stable machine-readable reason codes, human-safe descriptions, correlation identifiers, retry guidance, and the boundary between validation, policy, dependency, and transient failures. Document them in OpenAPI beside successful responses.

  • Keep public errors stable even when internals change.
  • Separate customer-safe language from operational detail.
  • Return identifiers that connect requests to traces and events.
  • State whether retrying is safe, useful, or harmful.
03

Contracts coordinate teams

A precise contract lets product, mobile, backend, QA, and support reason from the same source. Examples and boundary cases are often more valuable than another page of prose because they turn interpretation into executable expectations.

04

Supportability is leverage

When common questions can be answered from reason codes, diagnostics, and documentation, engineering support load falls. More importantly, recurring failures become structured product feedback instead of one-off detective work.