New in 2.4: Test runs you can trust See what's new →

Validation errors

Request validation in its common styles: /register — hand-written rules, 422 application/problem+json (RFC 7807) with per-field errors. /strict — rejects unknown fields (400) as well as invalid ones (422). /annotations — DataAnnotations model; [ApiController] produces the framework's automatic 400. /problem/{type} — sample problem documents for each common error status. Nothing is stored, so the same payload always gets the same answer.

Example request

List the sample problem document types. Full reference and a Send button.

cURL
curl -X GET "https://api.testingapis.com/api/validation/problem"
Run in Studio
Response · 200 OK
[
  {"type": "bad-request", "status": 400, "url": "/api/validation/problem/bad-request"},
  {"type": "unauthorized", "status": 401, "url": "/api/validation/problem/unauthorized"},
  "… 8 more items"
]