Skip to content

hiveguard keys

API key commands require dashboard credentials.

keys list

Terminal window
hiveguard keys list

Output columns: id, label, key_prefix, datasets, created_at.

The full key is never shown after creation — only the prefix (e.g., hg_ab).

keys create

Terminal window
hiveguard keys create LABEL [OPTIONS]
OptionTypeDescription
--datasetUUIDRestrict key to this dataset (repeatable)
--sample-ratefloatFraction of requests that trigger a challenge (0.0–1.0, default: 1.0)

Example:

Terminal window
hiveguard keys create "production" --dataset DS_ID --sample-rate 0.5

The raw key is displayed exactly once. Save it immediately.

New API key created:
Label: production
Prefix: hg_ab
Raw key: hg_abcdef1234567890
⚠ Store this key now — it will not be shown again.

keys revoke

Terminal window
hiveguard keys revoke KEY_ID

Revocation is immediate. All requests using this key will receive 401 from this point forward.