---
title: malformed_body — Malformed request body
description: "HTTP 400 malformed_body: The request body could not be parsed. Send valid JSON matching the Content-Type header."
canonical_url: "https://cascades.crscreditapi.com/docs/api/errors/malformed_body"
doc_version: "1.0.0"
last_updated: "2026-10-09T18:04:24Z"
http_status: 400
source: config/api_error_codes.yml
---

# `malformed_body` — Malformed request body

**HTTP 400 Bad Request**

Message: "The request body could not be parsed. Send valid JSON matching the Content-Type header."

Envelope schema: `ErrorEnvelope` in [openapi.json](https://cascades.crscreditapi.com/openapi.json#/components/schemas/ErrorEnvelope) ([YAML](https://cascades.crscreditapi.com/openapi.yaml)).

## What causes it
- The request declared `Content-Type: application/json` but the body was not valid JSON (truncated, trailing comma, single quotes, unquoted keys).
- The body was double-encoded — a JSON string containing JSON — or wrapped in a form field.

## How to fix it
1. Validate the body with a JSON linter before sending; most HTTP clients serialise a native object for you (`json=` in requests, `body: JSON.stringify(...)` in fetch).
2. Match `Content-Type` to the encoding actually used. Form-encoded bodies must not claim `application/json`.

## Operations that return it
- [POST /workflows](/docs/api/workflows/create-workflow) — Create a workflow
- [PATCH /workflows/{id}](/docs/api/workflows/update-workflow) — Update a workflow
- [POST /workflows/generate](/docs/api/workflows/generate-workflow) — Generate a workflow from a prompt
- [POST /workflows/{id}/trigger](/docs/api/workflows/trigger-workflow) — Trigger a workflow
- [POST /workflows/{id}/batches](/docs/api/batches/create-batch) — Create a batch from N rows
- [POST /executions/{id}/review_decisions](/docs/api/executions/submit-review-decision) — Approve or deny a paused review
- [POST /executions/{id}/review_assignment](/docs/api/executions/assign-review) — Claim or unassign a review
- [POST /executions/{id}/review_notes](/docs/api/executions/add-review-note) — Append a review note
- [POST /executions/review_bulk_actions](/docs/api/executions/bulk-review-actions) — Bulk approve / deny / assign_to_me
- [POST /webhook_subscriptions](/docs/api/webhooks/create-webhook-subscription) — Create a webhook subscription
- [PATCH /webhook_subscriptions/{id}](/docs/api/webhooks/update-webhook-subscription) — Update a webhook subscription

## Example response

```http
HTTP/1.1 400 Bad Request
Content-Type: application/json
```

```json
{
  "error": {
    "code": "malformed_body",
    "message": "The request body could not be parsed. Send valid JSON matching the Content-Type header.",
    "details": [],
    "request_id": "6f1c2a3e-8d4b-4c5e-9f0a-1b2c3d4e5f60",
    "doc_url": "https://cascades.crscreditapi.com/docs/api/errors/malformed_body"
  }
}
```

[All error codes](https://cascades.crscreditapi.com/docs/api/errors.md)

## Sitemap

See the full [sitemap](https://cascades.crscreditapi.com/sitemap.md) for all pages.
