API error · HTTP 400
invalid_json
Request body is not valid JSON
| HTTP status | 400 Bad Request |
|---|---|
code | invalid_json |
title | Request body is not valid JSON |
| Retry? | No |
What it means
The request body could not be parsed as JSON.
What to do
Do not retry unchanged. Serialise the body with a JSON library (UTF-8) and send it with Content-Type: application/json (§5).
Example response
Branch on code, never on title or detail. detail varies; quote request_id to support.
HTTP/1.1 400 Bad Request
Content-Type: application/problem+json
{
"type": "https://www.underwritinguk.ai/developers/errors/invalid_json",
"title": "Request body is not valid JSON",
"status": 400,
"code": "invalid_json",
"detail": "Request body is not valid JSON.",
"request_id": "7b0b1e5c-2f7e-4a52-9a43-5b0d0f0e9d11"
}All error codes · Error catalogue in the integration guide (§15) · Error handling and retries (§12.4)