Bash: curl POST JSON
A short, tested Bash example for curl post json. Copy it and adjust the names and paths for your project.
Bash
curl -X POST https://api.example.com/items \
-H "Content-Type: application/json" \
-d '{"name":"zest"}'
curl -sS -o out.json https://example.com/data.json # save to a file
curl -I https://example.com # headers onlyFind it in Zest
Search for “bash curl post json” in Zest and this example appears above the results, with other matches to choose from. Searches stay private.