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

  1. 1Check the Allow response header for supported methods
  2. 2Review API documentation for the correct HTTP method
  3. 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