---
title: "METHOD_NOT_ALLOWED"
description: "What triggers METHOD_NOT_ALLOWED (HTTP 405) when an endpoint does not support the requested HTTP method."
canonical_url: "https://docs.leyr.io/api/error-handling/method_not_allowed"
---
# METHOD_NOT_ALLOWED

> What triggers METHOD_NOT_ALLOWED (HTTP 405) when an endpoint does not support the requested HTTP method.

## Summary

This error corresponds to the standard `405 Method Not Allowed` HTTP status code, indicating that the HTTP method used is not supported for the requested endpoint.

## Example Response

```json
{
    "code": "METHOD_NOT_ALLOWED",
    "type": "https://docs.leyr.io/api/error-handling/method_not_allowed",
    "title": "Method not allowed",
    "status": 405,
    "detail": "Method not allowed. The POST method is not supported for this endpoint.",
    "instance": "92a31d64-8b5e-4f17-a2c9-d88e6c3f1592"
}
```

## Common Causes

- Using POST on an endpoint that only accepts GET requests
- Attempting to DELETE a resource on a read-only endpoint
- Using PUT instead of PATCH for partial updates
- Making a GET request to an endpoint that only accepts POST

<u-alert color="primary" variant="subtle">
<template v-slot:description="">

Each endpoint in our API supports specific HTTP methods designed for particular operations. Using an unsupported method will trigger this error even if the endpoint URL is correct.

</template>
</u-alert>

## Resolution Steps

To resolve this error:

1. Check our [API Reference](https://api.leyr.io/docs) to verify the supported HTTP methods for your target endpoint
2. If you're certain the HTTP method should be supported, check:
  - Your API client configuration
  - Any middleware that might be modifying your requests
3. If the issue persists, contact our support team at [contact@leyr.io](mailto:contact@leyr.io) with:
  - The `instance` ID from the error response
  - A description of what you were trying to achieve


## Sitemap

See the full [sitemap](https://docs.leyr.io/sitemap.md) for all pages.
