Yo, I feel your pain! curl sending JSON can be a headache. One thing that helped me was using `--data-binary` instead of `-d`. Like this:
```bash
curl -X POST -H "Content-Type: application/json" --data-binary '{"key":"value"}' https://example.com/api
```
This ensures the JSON is sent exactly as-is. Also, make sure your API endpoint is correct—400 errors can happen if the URL is wrong.
```bash
curl -X POST -H "Content-Type: application/json" --data-binary '{"key":"value"}' https://example.com/api
```
This ensures the JSON is sent exactly as-is. Also, make sure your API endpoint is correct—400 errors can happen if the URL is wrong.
