Skip to content

Api-Key — CLI Command

Usage

momentry api-key <ACTION> [OPTIONS]

Description

Manage API keys for server authentication and access control.

Arguments

Argument Type Required Description
ACTION enum Yes Action: create, list, validate, revoke, rotate, stats

Options

Option Type Required Description
--name string No Key name (for create)
--key-type string No Key type: system, user, service, integration, emergency
--ttl i64 No TTL in days (for create)
--key string No API key to validate/revoke

Examples

# Create a new API key
momentry api-key create --name "my-service" --key-type service --ttl 365

# List all API keys
momentry api-key list

# Validate an API key
momentry api-key validate --key muser_xxx

# Revoke an API key
momentry api-key revoke --key muser_xxx

# Rotate an API key
momentry api-key rotate --key muser_xxx

# Show API key statistics
momentry api-key stats

Agent Callable

Format: Not directly callable via agent JSON args.

Note: API key management is admin-level operation.

  • server — API server using these keys
  • gitea — Manage Gitea tokens
  • n8n — Manage n8n API keys