Learn · Guides
Rotate an API key
Replace a live key with no gap in service.
Checked against the product on · written for people writing code
Two key modes exist. A sandbox key runs against test data and bills nothing. A live key runs against your real work areas. Both authenticate the same way, with a bearer token.
Automate
Developer tools
| Key | Mode | Scopes | Created | Last used |
|---|---|---|---|---|
| ck_live_…4f2a | Live | events:write, cb:read | 2026-06-02 | 12 seconds ago |
| ck_test_…9b17 | Sandbox | events:write, cb:read | 2026-06-02 | 4 hours ago |
Rotate with no downtime
Open Developer tools and stay on the Keys tab.1
Read the scopes on the key you are replacing.2
The new key needs the same scopes.
Select New key and copy the value at once.3
The full value appears one time.
Deploy the new key to your systems and confirm traffic on it.
The Last used column moves within seconds of the first call.
Select Revoke on the old key.
Revocation takes effect on the next request. Both the creation and the revocation are written to the audit log.
From code
curl -X POST 'https://api.dmzagent.com/v1/api-keys' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{"name": "ingest", "livemode": false, "scopes": ["events:write", "cb:read"]}'The value appears once, in this response.
| Scope | Grants |
|---|---|
| events:write | Send events about a watched thing. |
| cb:read | Check a standing before a sensitive action. |
| reviews:write | Acknowledge a dispatched fix. |
| records:read | Read the logbook and build an evidence pack. |
| library:read | Browse the rule pack library and read a manifest. |