---
title: "Return empty lists as empty · Agent Wranglers"
url: https://agentwranglers.se/playbook/api-design/lists/empty-lists
updated: 2026-10-20
licence: "All rights reserved"
---

# Return empty lists as empty

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

- Level: Required
- Chapter: [Lists](https://agentwranglers.se/playbook/api-design/lists)
- Rule: Answer an empty result with 200 and an empty array. Never answer 404 or `null` for a list with nothing in it.
- How: A list resource exists even when it has no items. Keep 404 for an unknown parent, such as a missing customer.
- Check: List the orders of a test customer with no orders. The answer is 200 with `"items": []`.

**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/lists/empty-lists`.

- Previous: [Sort in a stable order](https://agentwranglers.se/playbook/api-design/lists/sorting)
- [Lists](https://agentwranglers.se/playbook/api-design/lists)
