# Management commands

Inspect API keys and webhooks, create scoped credentials, and distinguish local authentication settings from remote team changes.

Use management commands for credentials, webhooks, users, and settings. Start with reads; key creation exposes secrets and revocation can break running integrations. [Authenticate](/cli/authentication) first.

## First command

Inspect configured webhooks without changing delivery:

```bash
zernio webhooks:get-settings --pretty
```

Review the destinations, event subscriptions, and active state. Treat webhook configuration and secrets as sensitive output; do not paste the response into public logs.

## Commands

| Task | Command | Effect and verification |
|---|---|---|
| Check the current credential | `zernio auth:check` | Read users; local auth setup is [separate](/cli/authentication) |
| List API-key metadata | `zernio apikeys:list` | Read; inspect name, scope, and permissions |
| Create a reporting key | `zernio apikeys:create --name "CI reports" --permission read --scope profiles --profileIds "$PROFILE_ID"` | Write; secret appears only at creation |
| Revoke a key | `zernio apikeys:delete "$KEY_ID"` | Destructive; list keys afterward |
| Read one user | `zernio users:get "$USER_ID"` | Read; use a known team-user ID |
| List webhook settings | `zernio webhooks:get-settings` | Read; inspect destination and subscriptions |
| Delete a webhook | `zernio webhooks:delete-settings --id "$WEBHOOK_ID"` | Destructive; list settings afterward |

Get IDs from the corresponding listing or authorized team data. Confirm the exact key or webhook before deletion. Revoking the credential currently in use prevents verification with that credential.

## Store a newly created key

API-key creation returns the secret only once. Capture it to an access-controlled secret store, not a build log or agent transcript. A later `apikeys:list` response does not recover it.

The CLI supports `--expiresIn`, `--permission`, `--scope`, and comma-separated `--profileIds`. The API's `disabledResourceGroups` field has no flag on `apikeys:create`; use the dashboard or API when needed.

Test the new key against its intended read before revoking the old key. Do not assume a read-only or resource-restricted key can manage credentials or team identity.

## More team settings

| Need | CLI group | Reference |
|---|---|---|
| Invite a member | `invites:` | [Invites](/invites/create-invite-token) |
| Group connected accounts | `accountgroups:` | [Account groups](/account-groups/list-account-groups) |
| Configure account features | `accountsettings:` | [Account settings](/account-settings/get-messenger-menu) |
| Inspect plan usage | `usage:` | [Usage](/usage/get-usage) |

Use `zernio --help` to find the exact operation, then inspect its `--help`. Invitations, settings changes, and webhook creation are remote writes, not local configuration.

## How it behaves

- `auth:set` writes this machine's configuration. `apikeys:create` creates a remote credential. Neither operation replaces the other.
- Key and membership operations require appropriate privileges. A `403` is not proof that the API key is invalid.
- Webhook deletion changes delivery configuration; it does not undo events already delivered.
- Require explicit approval for credential creation, revocation, member changes, and webhook mutations. Never retry ambiguous writes without checking current state.

## Related

- [Authentication](/cli/authentication)
- [Create an API key](/api-keys/create-api-key)
- [Webhooks](/webhooks)
- [Options and output](/cli/options)