HTTP 418 I'm a Teapot

HTTP 418 is a reserved status code. Its “I’m a teapot” meaning comes from RFC 2324, a 1998 April Fools’ specification about brewing coffee. The current HTTP specification, RFC 9110, lists it as unused.

Definiert in RFC 9110 §15.5.19 — 418 (Unused) · MDN-Referenz · RFC 2324 §2.3.2 — Hypertext-Kaffeemaschinen-Steuerungsprotokoll

RFC 9110 reserves 418 as unused. The teapot phrase comes from RFC 2324 §2.3.2, a 1998 April Fools’ specification.

Example HTTP 418 request and response

curl -i https://funapi.dev/api/coffee/v1/teapot

The Coffee API returns 418 with an error message and an RFC 2324 reference. The hosted response also includes a requestId that varies by request.

{
  "error": "I'm a teapot",
  "message": "The requested entity body is short and stout. Tip me over and pour me out.",
  "rfc": "RFC 2324"
}

Run the Coffee API teapot example

Wo Ihnen HTTP 418 in der Praxis begegnet

If you encounter a 418 from a live service, check that service’s documentation or proxy configuration. RFC 9110 gives the reserved code no standard application meaning.

Warum Sie ihn testen sollten

Return 418 deliberately to check that your client, proxy and logs preserve an unexpected 4xx status. Assert the numeric status and inspect the JSON body.

Was Ihr Client bei einem 418 tun sollte

Treat a deliberate 418 as a client error and keep the numeric status in logs. Use it to test your generic 4xx handling, including whether the response body remains available to the caller.

418 und die Codes, mit denen er verwechselt wird

Endpunkte, die 418 zurückgeben

2 Endpunkte dieses Playgrounds antworten mit 418. Alle sind kostenlos, ohne Anmeldung und im Browser oder mit curl aufrufbar.

Fragen zu HTTP 418

Ist 418 ein echter HTTP-Statuscode?
Yes. The HTTP registry reserves 418 as unused under RFC 9110 §15.5.19. RFC 2324 §2.3.2 is the source of the teapot phrase.
Sollte ich 418 in der Produktion verwenden?
Use a defined status such as HTTP 400 for a malformed request or HTTP 422 for valid syntax that fails validation. Save deliberately generated 418 responses for controlled tests.

Weitere Client-Fehlercodes

Alle HTTP-Statuscodes · Alle 55 Mock-REST-APIs · Einstiegsanleitung

Zuletzt aktualisiert