API keys. Managed in admin.
Create keys, set permissions per resource, restrict to IP addresses, rotate with an overlap and revoke on the spot. No support ticket, no shared password in a chat thread.
Every key, every environment.
The admin overview
| Name | Prefix | Environment | Permissions | Last used | Expires | Status |
|---|---|---|---|---|---|---|
| Fortnox-sync | hdl_live_7Kq2… | Produktion | order:rw · artikel:rw | 2 min sedan | 2027-01-14 | Aktiv |
| Skrym frakt | hdl_live_R4mB… | Produktion | order:r · frakt:rw | 14 min sedan | 2027-03-02 | Aktiv |
| BI-export | hdl_live_9tZx… | Produktion | rapport:r | idag 06:00 | 2026-12-31 | Aktiv |
| Storefront preview | hdl_test_W1nP… | Test | katalog:r | yesterday 17:22 | — | Test |
| Gammal PIM-import | hdl_live_2Ffa… | Produktion | artikel:rw | 18 dagar sedan | 2026-08-20 | Roteras |
| Agency: campaign feed | hdl_live_Lp8c… | Produktion | katalog:r | — | Discontinued | Revoked |
A key is never shown in clear text after creation — only the prefix, so a key in a log can be identified without being exposed.
Permissions per resource, not all or nothing.
The secret is shown once the key is created and stored hashed. If it is lost, you rotate the key rather than recreate it.
Rotation without downtime.
Two secrets during the changeover
Start the rotation
A new secret is created for the same key with the same permissions. The old one keeps working for as long as you choose.
Swap it in the integration
You put the new secret in when it suits you. The log shows which of the two was used on each call.
Close the old one
Once all traffic has moved, the old secret is closed — immediately, or automatically when the overlap expires.
| Hemlighet | Skapad | Anrop senaste dygnet | Closes | Status |
|---|---|---|---|---|
| hdl_live_2Ffa… (ny) | 2026-08-06 09:12 | 4 812 | — | Aktiv |
| hdl_live_Kd71… (gammal) | 2025-11-02 14:40 | 318 | 2026-08-20 09:12 | Fasas ut |
Keys can be managed through the API too.
Endpoints and examples
The endpoints require a key with the auth:rw permission, which only an administrator can create in admin. A key can never grant itself more permissions than it already has.
// Create a key for a new integration const key = await hdl.auth.keys.create({ name: 'Fortnox-sync', environment: 'live', scopes: ['order:rw', 'article:rw', 'stock:r'], expiresAt: '2027-01-14', ipAllowlist: ['81.230.44.0/24'], rateLimit: { perMinute: 600 }, }); // key.secret exists only in this response // { id, prefix: 'hdl_live_7Kq2', secret: 'hdl_live_…' } // Rotate with a 14-day overlap await hdl.auth.keys.rotate(key.id, { overlapDays: 14 });
What the key actually does.
Built-in safeguards
The secret is shown once and stored hashed
Permissions per resource, read and write separately
IP restrictions and rate limits per key
Test and production have separate keys
When something has to be closed
Revoke immediately and the calls stop working at once
An expiry date with a reminder before it passes
Webhook signing secrets rotate separately
Every change lands in the activity log
Questions about keys.
Common questions
What if we lose the secret?+
It cannot be shown again. You rotate the key instead, which gives a new secret with the same name and permissions — and an overlap so the integration can be changed without rushing.
Can an agency have its own key?+
Yes. Give the key only the permissions the work requires, set an expiry date and restrict it to their IP addresses. It can be revoked without touching your other integrations.
Are test and production keys separate?+
Yes. The prefix shows the environment, and a test key can never reach production data.
How do we tell whether an old key is still in use?+
The list shows the last call per key, and during a rotation it shows call counts per secret, so you can see when it is safe to close the old one.
What happens at the rate limit?+
Calls answer with a 429 and a Retry-After header. The limit is set per key so one integration cannot crowd out the others.
Can webhooks be signed?+
Yes. Every webhook endpoint has its own signing secret, rotated separately from the API keys.
Go through your key management.
We look at which integrations need which permissions, and set up rotation before you go live.