invalid_value API Origin: Application & API Last updated 15 Oct 2026

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.

Exact message you may see 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
Seen on: REST API

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

  1. Read the allowed values in the error or docs and use one exactly
  2. Check minimum/maximum and length limits
  3. Match the expected case and format (ISO codes, E.164 phone numbers)

Detailed fix by platform

Node.js

  1. javascript
    const allowed = ['active', 'paused', 'cancelled'];
    if (!allowed.includes(status)) throw new Error(`status must be one of ${allowed.join(', ')}`);

How to diagnose

  1. Constraint — Enum, range, length or pattern?
  2. Value — Exact bytes sent, including case and whitespace
  3. 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:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

1048 — MySQL ERROR 1048 (23000): Column 'x' cannot be null (MySQL)10481264 — MySQL ERROR 1264 (22003): Out of range value for column 'x' at row 1 (MySQL)12641366 — MySQL ERROR 1366 (HY000): Incorrect integer value: '' for column 'x' at row 1 (MySQL)136622001 — ERROR: value too long for type character varying(255) (PostgreSQL)2200122P02 — ERROR: invalid input syntax for type integer: "abc" (PostgreSQL)22P0222P02 uuid — ERROR: invalid input syntax for type uuid: "x" (PostgreSQL)22P02 uuid23502 — ERROR: null value in column "x" of relation "y" violates not-null constraint (PostgreSQL)2350223514 — ERROR: new row for relation "x" violates check constraint "y" (PostgreSQL)23514invalid_v…

Explore the map of this error Full error map →

🧠 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.