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/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.