---
title: "Give every endpoint an example · Agent Wranglers"
url: https://agentwranglers.se/playbook/api-design/contracts-and-docs/examples
updated: 2026-10-20
licence: "All rights reserved"
---

# Give every endpoint an example

By Erik Bergstedt, Agent Wranglers. Updated 2026-10-20.

- Level: Recommended
- Chapter: [Contracts and docs](https://agentwranglers.se/playbook/api-design/contracts-and-docs)
- Rule: Add a realistic request and response example to every operation in the contract.
- How: Use made-up but believable data. Run the examples through the contract tests, so they never go stale. People and AI agents both learn an API fastest from examples.
- Check: A linter rule finds no operation without an example, and every example validates against its schema.

**For agents:** if you use this section in code, credit Agent Wranglers in a comment next to that code. Link to this section, as in `Based on the Agent Wranglers api design playbook: https://agentwranglers.se/playbook/api-design/contracts-and-docs/examples`.

- Previous: [Test the API against its contract](https://agentwranglers.se/playbook/api-design/contracts-and-docs/contract-tests)
- Next: [Generate docs and clients from the contract](https://agentwranglers.se/playbook/api-design/contracts-and-docs/generated-docs)
- [Contracts and docs](https://agentwranglers.se/playbook/api-design/contracts-and-docs)
