API Evangelist API Evangelist
API Learnings
APIs
API Governance
API Solutions
API Discovery
API Building Blocks
API Evangelist LLC

OpenAPI Operation Response 2xx Examples

Keeping up with the latest versions of the specification.

Success HTTP API responses should always posses multiple examples of what an API consumer can expect to see returned. Response examples are used in API documentation, mock servers, testing, and many other areas of API operations, and help API producers think more deeply about the designs of their APIs as they are developing them.

Make sure you utilize the plural version of OpenAPI examples for your 2xx responses, at least providing one, but ideally multiple successful examples of how an API will work. Examples are essential for distributing and onboarding with APIs, but they help light up the imagination with consumers when it comes to understanding what is possible with any API they are putting to work in applications and integrations.