METHOD_NOT_ALLOWED
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
{
"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
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.
Resolution Steps
To resolve this error:
- Check our API Reference to verify the supported HTTP methods for your target endpoint
- If you're certain the HTTP method should be supported, check:
- Your API client configuration
- Any middleware that might be modifying your requests
- If the issue persists, contact our support team at contact@leyr.io with:
- The
instance
ID from the error response - A description of what you were trying to achieve
- The
Table of Contents