Skip to main content

malformed_request

HTTP 400, type invalid_request_error.

The request body could not be parsed.

Why it happened​

The body was sent as application/json and is not valid JSON, so no field in it could be read. A body sent in a format the API does not read at all is unsupported_media_type instead.

How to fix it​

Send a JSON body with Content-Type: application/json, and check that it parses.

Retrying: retry only after fixing the body, to valid JSON sent as application/json. This request is refused before its Idempotency-Key is claimed, so send the corrected request with the same Idempotency-Key.