Authentication
Every request carries an API key. Keys belong to your account and are created in the dashboard.
Sending your key
Use the Authorization header with the Bearer scheme. The x-api-key header also works for tools that cannot set Authorization.
curl "https://www.hubcapdata.com/v1/balance" \
-H "Authorization: Bearer hc_live_…"Test and live keys
hc_test_…keys return deterministic sample data and never spend credit. Use them in development and CI. See Test mode.hc_live_…keys return real data and deduct each call’s price from your credit balance.
Keeping keys safe
- Keys are shown once when created. Hubcap stores only a SHA-256 hash, so a lost key cannot be recovered.
- Call Hubcap from your server, never from a browser or mobile app where the key would be visible.
- If a key leaks, roll it in the dashboard: the old key stops working at once and a new one is issued with the same name.
- Use a separate key per environment or service, so you can revoke one without touching the others.
A missing, malformed or revoked key returns 401 unauthorized. See Errors.