API key authentication
Every Public API request must carry your API key in theX-API-Key header.
Authorization: Bearer header is also accepted if that fits your HTTP client better:
Key format
Creating a key
Public API keys are self-service — you do not need to contact us.1
Open Settings
In the Huntd Dashboard, go to Settings → API & webhooks.
2
Create the key
The org owner creates a new key. This does not affect any existing key.
3
Copy it immediately
The key is displayed once. Store it somewhere safe before closing the dialog.
Keys for the Company Lookup API are provisioned differently — see
Authentication for that flow.
Multiple keys and rotation
An organization can hold several active keys at once, so rotation needs no downtime:- Create the new key.
- Deploy it to your services.
- Revoke the old key once nothing is using it.
401 INVALID_API_KEY on its next
request.
Authentication errors
Security best practices
Store keys in environment variables
Store keys in environment variables
Never hardcode a key in source. Read it from the environment or a secrets manager at runtime.
Never commit keys to version control
Never commit keys to version control
A key pushed to a repository — even a private one — should be treated as compromised and
revoked immediately.
Call from server-side code only
Call from server-side code only
A key in browser or mobile code is readable by anyone using your app. All Public API calls
should originate from your backend.
Use one key per service
Use one key per service
Separate keys let you revoke a single integration without disrupting the others, and make
unexpected usage easier to trace.