What it means
wrong id type or malformed id.
How to handle it
Use the expected resource prefix and pass the opaque identifier exactly as the API returned it.
Wire contract
| Code | invalid_id |
|---|---|
| Class | invalid_request |
| HTTP status | 400 |
| Meta keys | expected_prefix, received_prefix |
| Raised | Yes |
The response uses the standard {"error": {…}} envelope. Branch on error.code, not the human-readable message. Preserve request_id when reporting a failure.