HTTP 418 — I'm a teapot

The server refuses to brew coffee because it is a teapot

When to use it

Use status 418 when this is the correct HTTP response semantic: The server refuses to brew coffee because it is a teapot

Request and response example

GET /protected-resource HTTP/1.1
Host: api.example.com

HTTP/1.1 418 I'm a teapot
Content-Type: application/json

{"error":"Request cannot be completed"}

Related status codes

400, 401, 402, 403

References

MDN · RFC 9110