Back to Status Codes
Client Error (4xx)

HTTP 405 Method Not Allowed

The HTTP method used is not supported for this endpoint.

405

Method Not Allowed

The HTTP method used is not supported for this endpoint.

What Causes HTTP 405?

  • Using GET on a POST-only endpoint
  • Using DELETE on a read-only endpoint
  • Incorrect HTTP method for the operation
  • The endpoint does not implement the requested method

Code Examples

See how HTTP 405 responses look in different programming languages and tools.

curl -X DELETE https://api.example.com/users
# Response: 405 Method Not Allowed
# Allow: GET, POST

How to Fix HTTP 405

  • Check the Allow header to see which methods are supported
  • Use the correct HTTP method for the endpoint
  • Review API documentation for method support
  • Implement OPTIONS preflight for CORS requests

Related Status Codes

Test Your APIs

Frequently Asked Questions

What does HTTP 405 mean?

The HTTP method used is not supported for this endpoint.

What causes HTTP 405?

Using GET on a POST-only endpoint. Using DELETE on a read-only endpoint. Incorrect HTTP method for the operation. The endpoint does not implement the requested method

How to fix HTTP 405?

Check the Allow header to see which methods are supported. Use the correct HTTP method for the endpoint. Review API documentation for method support. Implement OPTIONS preflight for CORS requests

http 405method not allowed errorhttp status codesapi error handlingrest api client error