Dude, I had this exact issue last week! curl sending JSON can be tricky. One thing that worked for me was adding `-v` to the curl command to see the full request and response. Like this:
```bash
curl -v -X POST -H "Content-Type: application/json" -d '{"key":"value"}' https://example.com/api
```
This will give you more details about why the server is rejecting your request. Also, check if the API expects any specific headers or query params.
```bash
curl -v -X POST -H "Content-Type: application/json" -d '{"key":"value"}' https://example.com/api
```
This will give you more details about why the server is rejecting your request. Also, check if the API expects any specific headers or query params.
