---
title: "Send IDs as strings · Agent Wranglers"
url: https://agentwranglers.se/playbook/api-design/requests-and-responses/string-ids
updated: 2026-10-20
licence: "All rights reserved"
---

# Send IDs as strings

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

- Level: Required
- Chapter: [Requests and responses](https://agentwranglers.se/playbook/api-design/requests-and-responses)
- Rule: Type every ID as a string, even when it looks like a number today.
- How: JavaScript loses precision on whole numbers above 2 to the power of 53, minus 1. A string also lets you change the ID format later. A short prefix, such as `ord_`, tells people and agents what kind of ID it is.
- Check: The OpenAPI file declares every `id` and `...Id` field as `type: string`.

**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/requests-and-responses/string-ids`.

- Previous: [Send money as an integer with its currency](https://agentwranglers.se/playbook/api-design/requests-and-responses/money)
- Next: [Give every response one shape](https://agentwranglers.se/playbook/api-design/requests-and-responses/response-shape)
- [Requests and responses](https://agentwranglers.se/playbook/api-design/requests-and-responses)
