Cheatsheet Pages / curl Cheatsheet

How to send custom headers with curl — -H

The API wants an API key or a specific Accept header.

curl -H "X-API-Key: abc123" -H "Accept: application/json" \
  https://api.example.com/data

Good to know

Repeat -H once per header.

curl Cheatsheet one-page card — commands that actually work
The full one-page card — curl Cheatsheet. Get the complete cheatsheet on GitHub