HTTP status codes / 4xx — Client error

405 Method Not Allowed

What it means

The URL exists, but not for this HTTP method — a POST to a GET-only endpoint, a DELETE where none is defined. The Allow header lists what is permitted.

What causes it

Wrong verb in an API call; frameworks routing only specific methods; a redirect having converted POST to GET somewhere upstream.

How to fix it

Read the Allow response header — it tells you exactly which methods the endpoint accepts.