Section: Authentication patterns

API key header

http
http
X-API-Key: sk_live_123456
Explanation

If you support API keys, prefer headers over query parameters to reduce accidental leakage in logs and URLs.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Authentication patterns
Bearer token header
Send an OAuth or JWT access token.
OpenIn sheethttpsame section
Do not put tokens in the URL
Keep credentials out of path and query strings.
OpenIn sheettextsame section
Return 403 for insufficient role
Authenticated but lacks required permission.
OpenIn sheethttpsame section
Date-based compatibility header
Pin behavior by release date.
OpenIn sheethttp2 tag match
Path-based versioning
Explicit major version in the URL.
OpenIn sheethttp1 tag match
Media type versioning
Negotiate version with the Accept header.
OpenIn sheethttp1 tag match