API errors

Bad request

The request could not be parsed at the framework level, before schema validation even started. Nothing was processed or billed. A well-formed JSON body that merely violates the schema returns the more specific invalid-request error instead.

Error type
https://normbill.com/docs/errors/bad-request
HTTP status
400

Common causes

  • The body is not valid JSON — a syntax error, a truncated payload, or an empty body.
  • The Content-Type is not application/json (the body was sent as text or form data). Unsupported media types are reported here too.
  • The request was otherwise malformed before it reached the invoice endpoints.

How to fix it

  • Send a well-formed JSON body with the header Content-Type: application/json.
  • If your JSON is valid but a field is wrong, work from the invalid-request error and its errors array instead.
  • Check for accidental double-encoding, or a proxy that rewrote the request body.

The error response format

Every non-2xx response from the API is an RFC 9457 problem-details body (application/problem+json) with at least type, title, status and detail. The type URL links back to this reference.

All error slugs: invalid-request, bad-request, payload-too-large, unauthorized, validation-failed, unparseable-document, plan-limit, quota-exceeded, rate-limited, overage-cap-reached, validate-fair-use, generate-failure-fair-use, idempotency-key-invalid, idempotency-key-reuse, idempotency-conflict, pdf-unavailable, validator-unavailable, not-ready. Still stuck? Email support@normbill.com or start at the docs overview.

Spotted something?

Bug, missing feature, wrong validation result — tell us. The page you're on is attached automatically; email optional.