API Keys: Let an External System Connect
Create an API key for each external system that needs to talk to your organization, limit it to exactly the apps it needs, and revoke or rotate it at any time — the change takes effect on the very next request.
Some systems outside Docklify need to talk to your organization: a carrier portal reporting shipment status, an accounting tool pulling orders, a partner warehouse pushing updates. An API key is how such a system proves it is allowed in. You create one key per external system, choose exactly which apps it may use and whether it may only read or also write, and hand the key to that system’s administrator. Treat a key like a password: anyone holding it can act within the access you gave it. Only Owner and Admin roles can open this page.
Step 1: Create a key#
- Open Admin → API Keys (/admin/api-keys) and choose “Create key”.
- Give it a name that says which system it belongs to, such as “Carrier portal integration”. You will see this name in the list and in the audit trail.
- Tick the access per app: Read lets the system look, Write also lets it change things (Write includes Read). Only apps your organization has enabled are listed — give each system the least access it needs.
- Choose when the key expires: never, or after 30, 90 or 365 days. An expiring key is a good default for partners; the list warns you during the last 7 days before a key expires.
- Choose “Create”. The full key is shown once, in a popup — copy it right away and store it in the external system’s secure settings. After you close the popup, the key can never be shown again; the list only displays a masked form (the first characters and the last four). If the key is lost, rotate it (Step 4) instead of looking for it.
Step 2: How the external system uses the key#
The external system sends the key with every API request, in the x-api-key header (an Authorization: Bearer header with the same value also works). For example, a warehouse system reporting order status calls the OMS status callback endpoint and includes the key; the platform checks the key, confirms it has the app access that endpoint needs (in that case, OMS Write), and only then accepts the update. If the key is missing, wrong, revoked or expired, the request is rejected — nothing is applied halfway.
Step 3: Revoke a key#
- In the API Keys list, find the key and choose “Revoke”. You will be asked to confirm — revoking cannot be undone.
- Revocation takes effect on the very next request: the external system’s next call with that key is rejected. Revoke immediately when a partner relationship ends, a system is replaced, or a key may have leaked.
Step 4: Rotate a key#
Rotating means replacing a key with a fresh one that has exactly the same name, access and expiry, while the old key is revoked. Choose “Rotate” on the key’s row and confirm; the new key is shown once in the popup, just like at creation. Put the new key into the external system right away — as soon as the rotation completes, the old key stops working. Rotate regularly (for example every few months) and whenever a key may have been exposed. If the old key could not be revoked automatically, the popup tells you and the old key stays in the list so you can revoke it manually.
Step 5: See what a key has been doing#
Choose “Events” on a key’s row to see its history: when it was created, rotated or revoked and by whom, when it was last used successfully, and the rejected attempts recorded against it — with the reason in plain words (not enough access, expired, revoked) and the address that was called. The list also shows each key’s last-used time, so a key that has never been used, or has gone quiet, is easy to spot and clean up. Creating, revoking and rotating keys is also recorded in Admin → Audit Log.
Quick reference#
- One key per external system — never share one key between two systems, so you can revoke one without breaking the other.
- The full key is shown only once, at creation and at rotation. There is no way to view it again.
- Revoking takes effect on the next request — there is no waiting period.
- Write access includes Read access for the same app; access never carries across apps.