method_not_allowed error
method_not_allowed is returned with HTTP 405. Retryable: no. Sending the same request again returns the same error. Nothing is charged for this error.
What it means
This endpoint does not accept that HTTP method.
Most likely cause
The request used GET, PUT or another method on a lookup endpoint, often by opening the URL in a browser.
How to fix it
Use the method named in the Allow response header (lookup endpoints and /v1/mcp accept POST).
Example
Lookup endpoints accept POST only. A GET returns HTTP 405 with an Allow: POST header.
curl -i https://YOUR_API_HOST/v1/ip -H "Authorization: Bearer $LOOKVALID_API_KEY"
An error response is one JSON envelope. Branch on code, never on the message text. The message and fix of a real response can be more specific than the defaults shown here.
{
"error": {
"code": "method_not_allowed",
"message": "This endpoint does not accept that HTTP method.",
"fix": "Use the method named in the Allow response header (lookup endpoints and /v1/mcp accept POST).",
"docs_url": "https://lookvalid.com/docs/errors/method_not_allowed",
"retryable": false,
"request_id": "req_3fK9pQ2xVb7LmN4sTz8WcA"
}
}
See also
- All error codes with the response envelope.
- API reference.
- Quote the
request_idwhen you write to hello@lookvalid.com.