Use this example to separate API behavior from frontend, SDK or framework code.
cURL command
curl -sS -X POST 'https://api.example.com/v1/items' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_TOKEN' \
--data '{"name":"demo","enabled":true}'
How to use this example
- Replace the URL and token placeholder locally.
- Validate JSON before sending the request.
- Add -i when you need response headers.
Notes
- Never commit real bearer tokens in docs.
- Use curl -v only when you need low-level TLS or connection details.
Related tools and fixes
Last updated: May 18, 2026