The client must upgrade to a different protocol to continue.
426 Upgrade Required tells the client that this resource requires a protocol the current request did not use. Most commonly seen when an HTTP endpoint requires HTTPS, or when an HTTP/1.1 endpoint requires HTTP/2 or WebSocket. The response must include an Upgrade header listing acceptable protocols.
When servers should return it: Return 426 when a resource requires a specific protocol not used by the current request.
HTTP/1.1 426
upgrade: TLS/1.2, HTTP/2
connection: Upgrade
content-type: text/plain
This resource requires HTTPS
For a one-page reference of all HTTP status codes, see the HTTP cheat sheet. For testing API responses, try the API Tester tool. For inspecting responses on the command line, the curl cheat sheet covers the most common flags.