API errors

Malformed request

400 · malformed_request

Why you got this

The request body is not valid JSON. Nothing was parsed, so nothing was written.

What to do

Check the body serialises cleanly and that Content-Type: application/json is set. Bodies are flat JSON: {"email_address": "..."}, not {"contact": {"email_address": "..."}}.

How it arrives

Every failure on the API is an RFC 7807 problem document, sent asapplication/problem+json. Branch on type — or on its last segment, which is the code above — rather than ontitle or detail, which are prose and may be reworded.

{
  "type": "https://emailfig.com/docs/errors/malformed_request",
  "title": "Malformed request",
  "status": 400
}

Every code

Back to the API reference