# method-not-allowed

<Badge variant="warning">405 Method Not Allowed</Badge> <Badge variant="muted">method-not-allowed</Badge>

| Field | Value |
|---|---|
| **Type URI** | `https://docs.kordiam.app/docs/errors/method-not-allowed` |
| **HTTP Status** | `405 Method Not Allowed` |

## Description

The HTTP method used in the request is not supported for the target endpoint. The server understands the request URL, but the specific method (GET, POST, PUT, DELETE, etc.) is not allowed.

## Response Example

```json
{
  "type": "https://docs.kordiam.app/docs/errors/method-not-allowed",
  "title": "Method Not Allowed",
  "status": 405,
  "detail": "HTTP method 'POST' is not supported for this endpoint",
  "instance": "/api/v2/elements/42",
  "traceId": "abc-123-def",
  "supportedMethods": ["GET", "PUT"]
}
```

## Common Causes

- Using POST instead of PUT for an update operation
- Using GET on a write-only endpoint
- Using DELETE on an endpoint that does not support deletion

## How to Fix

Check the API documentation for the endpoint to see which HTTP methods are supported. When Spring can determine them, the response includes `supportedMethods`. Update your request to use one of the supported methods and retry.
