Posting a multi-line file with `-d @file` silently changes its content.
curl --data-binary @payload.json \
-H 'Content-Type: application/json' \
https://api.example.com/items
-d @file removes carriage returns and newlines from the file before sending, which damages multi-line text and binary data. --data-binary sends the bytes untouched. Both default to Content-Type: application/x-www-form-urlencoded, so a JSON API needs the explicit header. A payload that is a single JSON line survives -d fine, so the problem only shows up with pretty-printed files. Use --data-binary for anything that comes from a file.
Further reading: curl manual