Every JSON request used to need a `-H ‘Content-Type: application/json’` line next to the data.
curl --json '{"name":"test","qty":2}' https://api.example.com/items
curl --json @payload.json https://api.example.com/items
--json (7.82.0 and newer) means --data-binary plus the headers Content-Type: application/json and Accept: application/json. A leading @ reads the body from a file, which is sent as it is, newlines included. Use that form for large payloads so the shell does not need to quote them. curl does not validate the JSON, so a typo reaches the server unchanged. curl -V shows your version if the flag is rejected. On older builds the long form is -H twice plus --data-binary.
Further reading: curl manual