# invalid_request

The request could not be read.

## What it means

We could not parse the request body or its headers before validating it. Nothing was changed.

## Why it happens

- The body is not valid JSON: a trailing comma, single quotes, or an unescaped character.
- `Content-Type` is missing or is not `application/json`. The API is JSON only; form fields (`-d name=value`) are not read.
- The body was sent with a GET request, or a header value is malformed.

## What to do

1. Send a JSON body with `Content-Type: application/json`. With curl, quote the body: `-d '{"hostname":"careers.acme.com"}'`.
2. Check the body with a JSON linter or `JSON.stringify` it rather than building it by hand.
3. `error.message` names the part we could not read.

- [Open the dashboard](/app/domains)
- [All limits](/docs/limits-and-pricing)

## In the API

```
HTTP 400

{
  "error": {
    "code": "invalid_request",
    "message": "The request could not be read.",
    "fix": "Send a well-formed JSON body with Content-Type: application/json.",
    "docs": "https://apexly.dev/docs/errors/invalid_request"
  }
}
```
