Your curl post json is *almost* right, but yeah, missing headers. Some APIs also expect `Accept: application/json`. Here’s a bulletproof version:
```bash
curl -X POST https://api.example.com/data \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"test","value":123}'
```
If it still fails, the API might need auth (like an API key). Check their docs!
```bash
curl -X POST https://api.example.com/data \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d '{"name":"test","value":123}'
```
If it still fails, the API might need auth (like an API key). Check their docs!
