# Method Not Allowed

Source: https://apiguide.dev/errors/method-not-allowed
Problem type URI: https://apiguide.dev/errors/method-not-allowed
Status: 405 Method Not Allowed
Updated: 2026-10-14

## When to use it

Use 405 Method Not Allowed when the HTTP request URI matches a valid path in your routing table, but the specific HTTP method used (e.g. `POST`, `PUT`, `DELETE`) is not supported by that endpoint.

HTTP specifications require that a 405 response must include an `Allow` header listing the valid HTTP methods for the requested resource (e.g. `Allow: GET, HEAD`).

## When not to use it

Do not use 405 if the URI itself does not exist in the routing table (use `resource-not-found` / 404 instead). If the server does not recognize or implement the method for any resource at all, use `not-implemented` (501).

## Example response

```json
{
  "type": "https://apiguide.dev/errors/method-not-allowed",
  "title": "Method Not Allowed",
  "status": 405,
  "detail": "The POST method is not supported for this endpoint. Supported methods: GET, HEAD.",
  "instance": "/v1/leads"
}
```

Together with the response, send the `Allow` header:

```http
Allow: GET, HEAD
```
