API error

invalid_request

HTTP 400, 405 · no credit is used for a request that ends in an error.

A parameter is missing, has the wrong type or is out of range, the Authorization header is not Bearer <key>, or the API key was sent in the URL (a query parameter named api_key in any spelling, such as apiKey or API-KEY, or any query value that looks like a key). The message names the fields at fault. A method the path does not take (such as GET /v1/bulk) is a 405 with an Allow header that lists the methods it does take, sent before the key is checked; /a2a does the same with Allow: POST. /mcp checks the key first: with a valid key, any method but POST gets its 405 with Allow: POST and a JSON-RPC body instead.

What to do

Correct the request. Send the key in the Authorization header, never in the query string. On a 405, use a method from Allow.

Retry

No: fix the request. When and how often to retry any error: retrying safely.

The answer

{
  "error": {
    "code": "invalid_request",
    "message": "The request is invalid.",
    "request_id": "req_7Hq2LmX9cV4bN8tR1zK6wD"
  }
}

API key sent in the URL:

{
  "error": {
    "code": "invalid_request",
    "message": "Send the key in the Authorization header, not in the URL. See https://email-validation.org/docs/authentication/",
    "request_id": "req_7Hq2LmX9cV4bN8tR1zK6wD"
  }
}

Branch on code, which is stable; message is for people and may change. Keep request_id in your logs.

Headers that come with it:

  • X-Request-Id: Our ID for the request (same as request_id in bodies).
  • Allow: The method the path takes.

Endpoints that can answer it

More

Updated · Maintained by: Email Validation LLC

Need help? Contact support, or ask the help chat. Something wrong or missing on this page? Tell us