TestingAPIs is still being built. If something breaks, email support@testingapis.com.

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.

Your account unlocks these endpoints. Try it on each endpoint's page sends your key for you; from your own code, send a key from your API keys page in the X-TestingApis-Key header.

These endpoints need a free account. Create one or sign in to see their details and try them here.

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" \
  -H "X-TestingApis-Key: YOUR_API_KEY"
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"
]

Sign in to see the details

The parameters, request and response examples and the live Try it panel for these endpoints are for signed-in members. Accounts are free and take a few seconds to create.