Skip to main content

When to use

  • User needs an API key scoped to a specific organization for deployments or automation
  • Setting up CI/CD credentials for a team or client workspace
  • Creating keys for agents or scripts that trigger workflows within an org

Prerequisites

  • codika CLI installed and authenticated
  • Personal key (ckp_) or admin key (cka_) with api-keys:manage scope
  • Target organization must already exist (see Create Organization)

Command

Options

Available scopes

Behavior

  1. Validates that the authenticated key has the api-keys:manage scope
  2. Verifies the user is an admin or owner of the target organization
  3. Creates a new organization key (cko_) with the specified scopes
  4. Saves the new key as a profile and sets it as active
  5. Returns the raw key once — it cannot be retrieved again after creation

Examples

Output

The raw key is displayed only once at creation time. Store it securely — it cannot be retrieved later.

Exit codes