Firsty

Search...

Search...

API errors

Bad request

The request was malformed or a parameter had an invalid value. The detail field says which one.

400application/problem+json

What it means

The API could not accept the request as sent: the body could not be parsed, or a value is not one the endpoint can act on (an unknown lifecycle operation or an unsupported country code, for example). The single problem is described in detail.

This is the sibling of validation failed, which covers field-level validation and carries a per-field errors array. A bad-request document has no errors array; everything it knows is in detail.

400 · application/problem+json
{
  "type": "https://developers.firsty.app/errors/bad-request",
  "title": "Bad request",
  "status": 400,
  "detail": "Malformed JSON in request body"
}

How to handle it

  1. Read detail. It names the missing parameter or the invalid value directly.

  2. Fix how the request is built and resend. The same request will fail the same way every time, so do not retry it unchanged.

  3. Treat recurring cases as a bug in the caller, not a transient fault. Nothing on Firsty's side will start accepting the request.

Related