← all problem types

validation_failed

422 Unprocessable Content   The request body or query is not valid.

When you get it

The request body or query is not valid. It is always answered with HTTP 422 - one code means one status, so a client may key its handling on either.

Fields it carries

Inside each errors[] entry, beside pointer:

pointer
RFC 6901 JSON Pointer to the offending value in the request body.
parameter
The query parameter the failure is about - the query-side twin of `pointer`.
detail
Human-readable detail for this one occurrence. Never the only place remediation appears.
value
The value the request sent, echoed back so the caller can see what was read.
allowed
The complete set of values this field accepts. Send one of these.
reason
The machine-readable sub-case, when one code covers several. Branch on it.
min
The smallest value this field accepts, inclusive.
max
The largest value this field accepts, inclusive.
didYouMean
The registered name closest to the one you sent - usually the fix is this spelling.
expiresIn
How long the value is valid for, in seconds, counted from when it was issued.
expected
What this member should have been. On `wrong_type` it is the JSON type the member must have - `string`, `number`, `integer`, `boolean`, `object`, `array` or `null` - and an array of those names when more than one is accepted (`["string", "null"]` means the member is nullable). On a selection mismatch it is instead the count YOUR preview reported while `actual` is what the server counts NOW - the drift is the point. Where the refusal is about a token or a flag, it is the value the server required.
minItems
The fewest items this operation accepts in one request. An empty or absent list is refused rather than treated as "none".
maxItems
The most items this operation accepts in one request - the same fact as `limit`, under the spelling this endpoint uses.
alternatives
Other ways to express the same request that this operation does accept. Send one of these shapes instead.
oneOf
Members of which exactly one satisfies the requirement - send any single one of them, not all.
existingId
The id of the resource that already holds the key you tried to claim.
retryAfterSeconds
How long to wait before retrying, in seconds. Mirrors the Retry-After header.

A field is omitted when the server genuinely does not know it - an absent member is never the same as an empty one.

How to fix it

The request was well-formed but a value is not acceptable. The fields above name the offending value and what would be accepted - fix the request and retry.

Shape

{
  "type":   "https://api2.host-tracker.com/problems/validation-failed",
  "title":  "The request body or query is not valid.",
  "status": 422,
  "code":   "validation_failed",
  "errors": [
    { "pointer": …, "parameter": …, "detail": …, "value": …, "allowed": …, "reason": …, "min": …, "max": …, "didYouMean": …, "expiresIn": …, "expected": …, "minItems": …, "maxItems": …, "alternatives": …, "oneOf": …, "existingId": …, "retryAfterSeconds": … }
  ]
}