API Error: Invalid parameter value — must be one of the allowed values / out of range
The field has the right type but a value the API doesn’t allow — not in the list of accepted options, too small or large, too long, or not matching the required pattern.
must be equal to one of the allowed valuesInvalid enum valuemust be one ofmust be less than or equal tomust be greater than or equal to Meaning
Beyond types, schemas restrict values: enums (“status must be one of active, paused”), numeric ranges (minimum/maximum), string length and regex patterns (emails, currency codes, phone numbers).
Case matters (“USD” vs “usd”), and an option that existed in an older API version may have been renamed or removed.
Common causes
- Value not in the allowed enum (typo, wrong case, renamed option)
- Number below minimum or above maximum
- String too long/short or not matching a pattern
- Using an option from another API version
⚡ Quick fix
- Read the allowed values in the error or docs and use one exactly
- Check minimum/maximum and length limits
- Match the expected case and format (ISO codes, E.164 phone numbers)
Detailed fix by platform
Node.js
- javascript
const allowed = ['active', 'paused', 'cancelled']; if (!allowed.includes(status)) throw new Error(`status must be one of ${allowed.join(', ')}`);
How to diagnose
- Constraint — Enum, range, length or pattern?
- Value — Exact bytes sent, including case and whitespace
- Version — Does your API version support this option?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
Most viewed in API
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 15 Oct 2026