Create a new API key with specified scopes.
Cannot create keys with higher scopes than the current key.
Site-scoped keys restrict access to a single site.
Requires: API key with write scope.
Args:
name: Human-readable name for the key (1-100 chars)
scopes: Comma-separated scopes. Options: "read", "read,write",
"read,write,admin". Default: "read"
site_slug: Optional — restrict the key to a single site.
Omit for account-wide access.
Returns:
{"api_key": "bh_...", "key_id": "uuid", "prefix": "bh_...",
"name": "My Key", "scopes": ["read", "write"],
"message": "Store this API key securely — it will not be shown again."}
Errors:
VALIDATION_ERROR: Invalid name, scopes, or max 25 active keys
FORBIDDEN: Cannot create keys with higher scopes than current key