Short and sweet:
```
curl -X POST https://example.com/api -H "Content-Type: application/json" -d '{"name":"test"}'
```
If 400 persists, maybe the server expects `Accept: application/json` too? Some APIs are picky.
```
curl -X POST https://example.com/api -H "Content-Type: application/json" -d '{"name":"test"}'
```
If 400 persists, maybe the server expects `Accept: application/json` too? Some APIs are picky.
