I'm a teapot
4xx Client Error
Last updated:
The server refuses to brew coffee because it is, permanently, a teapot.
Description
The famous April Fools joke code from RFC 2324 (Hyper Text Coffee Pot Control Protocol). Not part of standard HTTP, but implemented by some servers as an easter egg.
When to use
For fun, or to reject bot traffic in a memorable way.
Specification
RFC 2324 (April Fools)
Examples
HTTP response
HTTP/1.1 418 I'm a teapot
Content-Type: application/json
{"error":"I'm a teapot"}Node.js (Express)
res.status(418).json({ error: "I'm a teapot" });Go (net/http)
w.WriteHeader(http.StatusTeapot)
Python (Flask)
return jsonify({"error": "I'm a teapot"}), 418Related status codes
All 4xx codes
400 Bad Request401 Unauthorized403 Forbidden404 Not Found405 Method Not Allowed406 Not Acceptable408 Request Timeout409 Conflict410 Gone411 Length Required412 Precondition Failed413 Payload Too Large414 URI Too Long415 Unsupported Media Type418 I'm a teapot422 Unprocessable Entity425 Too Early428 Precondition Required429 Too Many Requests431 Request Header Fields Too Large451 Unavailable For Legal Reasons