Quick answer
An API may return a 200 with an empty body, or the body might be missing.
API Empty Response Body
An API may return a 200 with an empty body, or the body might be missing. If you expect JSON, an empty body is invalid JSON and will cause parse errors.
Common causes
- API returns 204 No Content or 200 with no body.
- Network or proxy stripped the body.
- Wrong endpoint or method returned nothing.
How to fix
- Check HTTP status and Content-Length before parsing.
- Handle empty body in your client (e.g. treat as null or skip parse).
- Validate with an API response checker; it will report empty body.
FAQ
- Is an empty body valid JSON?
- No. Valid JSON is at least a value (e.g. null, [], {}). An empty string is not valid JSON.
- What if the API returns 204?
- 204 No Content means no body by design. Do not try to parse JSON; check status first.
Fix it now
Try in validator (prefill this example)