invalid_input error
invalid_input is returned with HTTP 400. Retryable: no. Sending the same request again returns the same error. Nothing is charged for this error.
What it means
The request input is invalid.
Most likely cause
A required field is missing, a value has the wrong type or format, or the body is not valid JSON. The message names the field.
How to fix it
Correct the field named in the message and resend. Each product input schema is in the OpenAPI document. Nothing was charged.
Example
The IP lookup needs an ip field. An empty object is refused with HTTP 400 and nothing is charged.
curl -i -X POST https://YOUR_API_HOST/v1/ip -H "Authorization: Bearer $LOOKVALID_API_KEY" -H "Content-Type: application/json" -d '{}'
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": "invalid_input",
"message": "The request input is invalid.",
"fix": "Correct the field named in the message and resend. Each product input schema is in the OpenAPI document. Nothing was charged.",
"docs_url": "https://lookvalid.com/docs/errors/invalid_input",
"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.