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
- Validates that the authenticated key has the
api-keys:manage scope
- Verifies the user is an admin or owner of the target organization
- Creates a new organization key (
cko_) with the specified scopes
- Saves the new key as a profile and sets it as active
- 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