> The index of all pages is at https://docs.afffast.com/llms.txt.

# request_body_invalid

The request body is not valid JSON.

HTTP status: **400**. Error type: `invalid_request_error`.

The request body is not valid JSON.

## Example

```json
{
  "error": {
    "type": "invalid_request_error",
    "code": "request_body_invalid",
    "message": "The request body is not valid JSON.",
    "doc_url": "https://docs.afffast.com/errors/request-body-invalid",
    "request_id": "req_3kQ9x7WmZpL2vNd8TfYb4A"
  }
}
```

## Causes

- The body is not valid JSON.
- The body of a file upload is not valid `multipart/form-data`, or the file cannot be read.

## How to fix

- Send valid JSON with the header `Content-Type: application/json`.
- For an import, send `multipart/form-data` with the file in the field `file`.
