4xx Client Error
HTTP 405 Method Not Allowed
The HTTP method used is not supported for the requested resource. For example, trying to POST to a read-only endpoint or DELETE a resource that doesn't allow deletion.
Common Causes
- Using POST on an endpoint that only accepts GET
- Trying to DELETE a read-only resource
- API endpoint doesn't support the used HTTP method
- Web form action pointing to wrong endpoint
How to Fix
- 1Check the Allow response header for supported methods
- 2Review API documentation for the correct HTTP method
- 3Ensure your client is sending the right method (GET, POST, etc.)
Example
HTTP 405 Method Not Allowed
DELETE /api/users HTTP/1.1 → 405 Method Not Allowed → Allow: GET, POST
Related Client Error Codes
400
Bad Request
401Unauthorized
402Payment Required
403Forbidden
404Not Found
406Not Acceptable
407Proxy Authentication Required
408Request Timeout
409Conflict
410Gone
411Length Required
412Precondition Failed
413Content Too Large
414URI Too Long
415Unsupported Media Type
416Range Not Satisfiable
417Expectation Failed
418I'm a Teapot
421Misdirected Request
422Unprocessable Content
423Locked
424Failed Dependency
425Too Early
426Upgrade Required
428Precondition Required
429Too Many Requests
431Request Header Fields Too Large
451Unavailable For Legal Reasons