The server does not support the request method or feature.
501 Not Implemented means the server does not know how to handle the request method at all (TRACE, CONNECT) or does not implement a feature requested in headers (e.g. unknown Transfer-Encoding). It is different from 405 Method Not Allowed: 405 means "this resource does not support this method"; 501 means "this server does not support this method, period".
When servers should return it: Return 501 when the server lacks support for a method or feature, not when a specific resource refuses the method.
HTTP/2 501
content-type: text/plain
Method not implemented
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.