Overview
APIs are contracts. Make them predictable, honest and stable, and developers will trust and reuse them.
Design
routes
GET /v1/leads
POST /v1/leads
GET /v1/leads/:idErrors
shape
{ "error": { "code": "invalid_email", "message": "Email is required" } }Versioning
Version in the path. Add fields without breaking; deprecate with a sunset header and a migration window.