> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fiveninelabs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# invalid_param

> 400 invalid_request — a request field is missing, malformed, or refused; param names it.

**HTTP 400 · type `invalid_request`.** The request body or parameters are malformed:
a required field is missing, a value is out of range, or a URL failed the hard wall
(webhook, discover, and extraction targets must be https and resolve to public
unicast hosts — private, loopback, and link-local/metadata ranges are refused).
Nothing ran and nothing was charged.

## The shape

```json theme={null}
{
  "error": {
    "type": "invalid_request",
    "code": "invalid_param",
    "message": "max_spend_usd is required and must be a positive number.",
    "doc_url": "https://docs.fiveninelabs.com/errors/invalid_param",
    "request_id": "req_1kd92m",
    "param": "max_spend_usd"
  }
}
```

`param` names the offending field. In the batch extraction form, validation is
all-or-nothing: one invalid URL fails the whole POST with `param` naming it — no
partial batch is created.

<Warning>
  **Malformed JSON is currently misreported as this error.** A request body that fails
  to parse — or exceeds the 1 MB body cap — is treated as an empty body, so the
  response says the first required field is missing (typically
  `"query is required"`) even when your payload contains that field. If you get
  "is required" for a field you're sending: validate that your JSON parses, check your
  serializer (a trailing value like `"max_spend_usd": }` is the classic), and confirm
  the body is under 1 MB. A dedicated parse-failure error code is planned.
</Warning>

## How to fix

* Read `param` and correct that field. Common cases: `max_spend_usd` missing on a
  spending POST (it is always required), `cadence_s` under the 3600 minimum on a
  monitor, a non-https or non-public `url` / `webhook_url`.
* Check the field's exact name and type in the [API reference](/api-reference) —
  request bodies are `snake_case`.

## Reproduce it

Omit the required `max_spend_usd` (works on an `fn_test_` key, \$0):

```bash theme={null}
curl https://api.fiveninelabs.com/v1/sessions \
  -H "Authorization: Bearer $FIVENINE_TEST_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "vinyl records under $30"}'
```
