API keys
Server-to-server access to one business, with scopes, an optional expiry and rotation.
An API key belongs to one business. Owners create keys on the dashboard page API (package Scale) and choose the scopes, an optional validity and later a rotation.
Shell
curl "https://hevia.app/api/v1/deals" -H "Authorization: Bearer hv_live_..."Format
| Prefix | Meaning |
|---|---|
hv_live_ | A key of a real business. |
hv_test_ | A key of a sandbox business. Same length, same rules. |
A key is the prefix plus 43 characters. It is shown once; Hevia stores only its SHA-256 hash and shows the first characters (for example hv_live_ab12) to tell keys apart.
Lifetime and rotation
- Validity: none, or 30, 90, 180, 365 days.
- Rotate: a new key is created and the old one keeps working for a grace period of 0 h, 1 h, 24 h, 72 h (default 24 h).
- Revoke: the key stops working at once. An unknown, revoked or expired key gets the same
401 unauthorized. - At most 20 active keys per business.
Limits
120 requests per 60 seconds per key, plus a wider limit per address. See Errors and limits.
Tip
One key per system that calls Hevia. When one leaks, you revoke one key and nothing else stops.