CanopyAPI docs

invalid_json

The request body is not valid JSON. Canopy could not read it at all.

HTTP 400

When you see this

Only POST /api/v1/intents returns this error. It is the one write route that reads a body. Canopy rejects the request before it looks at any field. Canopy treats an empty body as {}. Only a non-empty body that fails to parse lands here.

If the body is valid JSON but has a missing or wrong-typed field, you get invalid_request instead.

What the response looks like

json
{
  "error": {
    "code": "invalid_json",
    "message": "The request body is not valid JSON.",
    "request_id": "req_1a2b3c4d5e6f7a8b9c0d1e2f",
    "docs": "https://canopypay.io/errors/invalid_json"
  }
}

param is never present. There is no single field to name.

What to do

Check that your client sends the body as JSON. Use JSON.stringify(body), not a form-encoded or raw string body. Then check that nothing in between changes the body, such as a proxy, logging middleware or a hand-built HTTP client. Fix this on your side. Retrying the same bytes fails the same way.