screen size not supported

404 Not Found JSON response example

Last updated 2026-05-20

When to use this

Use this for "the resource does not exist" — either the id is wrong, or the path is unknown. Include the resource type and the id so the client can surface a useful message.

Example JSON

Returned when /products/<id> or /users/<id> does not match anything.
{
  "status": 404,
  "error": "Not Found",
  "message": "Product with id 9999 was not found",
  "code": "resource_not_found",
  "resource": "product",
  "id": 9999
}

Request examples

const res = await fetch('https://jsonexamples.com/http/404/Resource+not+found');
if (!res.ok) {
  const err = await res.json();
  console.error(res.status, err.message);
}

Try the live endpoint

Click below to call /http/404/Resource+not+found from your browser.

// click the button to populate this block

Common variations

Path-not-found variant
{
  "status": 404,
  "error": "Not Found",
  "message": "No route matches GET /unknown-path",
  "code": "path_not_found"
}

Convert this JSON

Generated starting points for TypeScript, JSON Schema, and Zod. Refine before shipping to production.

export interface 404NotFound {
  "status": number;
  "error": string;
  "message": string;
  "code": string;
  "resource": string;
  "id": number;
}