Skip to content

4xx Client error

405 Method Not Allowed

The endpoint exists, but doesn't support this HTTP method.

What 405 means

For example, sending GET to an endpoint that only accepts POST. The Allow header lists the methods it does accept.

Common causes

  • Using GET instead of POST (or vice versa).
  • A missing trailing slash causing a redirect that changed POST to GET.

How to fix it

If you're calling an API

  • Check the Allow header and the docs for the right method.

If you run the server

  • Always send an Allow header with 405.

Should you retry?

Only with the correct method.

Example response

HTTP
HTTP/1.1 405 Method Not Allowed
Allow: GET, POST
Content-Type: application/problem+json

{
  "type": "about:blank",
  "title": "Method Not Allowed",
  "status": 405,
  "detail": "The endpoint exists, but doesn't support this HTTP method."
}

Related headers: Allow.

Defined in: RFC 9110 (HTTP Semantics). 405 is a client error: change the request before retrying.

Debugging an API call? Convert your request with the cURL converter, check the response with the JSON formatter, or see whether the API is down on its status page.

HTTP 405 FAQ

What does HTTP 405 mean?

405 Method Not Allowed: The endpoint exists, but doesn't support this HTTP method. For example, sending GET to an endpoint that only accepts POST. The Allow header lists the methods it does accept.

Is 405 a client or server error?

It's a client error (4xx): something about the request needs to change before it can succeed.

How do I fix a 405 error?

Check the Allow header and the docs for the right method.

Should I retry after a 405?

Only with the correct method.

Other 4xx status codes

All HTTP status codes