Mock an RFC 9457 problem+json error

A GET mock that returns a 422 application/problem+json validation error shaped per RFC 9457.

Stands in for a third-party API endpoint.

Response payload

{
  "type": "https://quickmock.dev/problems/validation-error",
  "title": "Your request parameters didn't validate",
  "status": 422,
  "detail": "The 'email' field must be a valid email address.",
  "instance": "/m/YOUR-SLUG/requests/38f0",
  "errors": [
    {
      "field": "email",
      "message": "must be a valid email address"
    }
  ]
}

Fields worth knowing

Field What it means
type A URI identifying the problem type — it's a documentation address, not necessarily a working link.
title A short, human-readable summary of the problem.
status Mirrors the HTTP response status, kept in the body for clients that log it separately.
detail A specific explanation for this occurrence; edit it to match the failure you're testing.
errors A non-standard extension array with field-level errors, the kind GitHub- or Stripe-style APIs often add.

Create the mock

curl -X POST https://quickmock.dev/api/mocks \
  -H 'Content-Type: application/json' \
  -d '{
  "method": "GET",
  "response_status": 422,
  "content_type": "application/problem+json",
  "response_body": "{\"type\":\"https://quickmock.dev/problems/validation-error\",\"title\":\"Your request parameters didn't validate\",\"status\":422,\"detail\":\"The 'email' field must be a valid email address.\",\"instance\":\"/m/YOUR-SLUG/requests/38f0\",\"errors\":[{\"field\":\"email\",\"message\":\"must be a valid email address\"}]}"
}'

Call it

curl https://quickmock.dev/m/<slug>

What you get

GET /m/<slug> -> 422 application/problem+json
an RFC 9457 problem document with a custom errors[] extension

How this differs from the real thing

This is one fixed validation error — status, detail, and the errors[] extension are all hardcoded, so edit the response body to reproduce the exact failure your client needs to handle instead of a generic 422.

Ready to use it?

Open it in the mock builder to tweak first

Pairs well with this guide: Mock a specific error response

← All templates