Skip to main content

When to use

  • Change the scopes of an existing API key (e.g., add projects:read scope)
  • Rename a key for better identification
  • Update the description of a key

Prerequisites

  • codika CLI installed and authenticated
  • API key with api-keys:manage scope
  • Caller must be an admin or owner in the organization
  • The key ID of the key to update (from the platform dashboard or create-key output)

Command

codika organization update-key [options]

Options

OptionDescriptionDefault
--key-id <id>Key ID to update (required)
--scopes <scopes>New comma-separated scopes (replaces existing)
--name <name>New key name
--description <desc>New key description
--api-url <url>Override API URL
--api-key <key>Override API key
--profile <name>Use a specific profile instead of the active one
--jsonOutput as JSON
At least one of --scopes, --name, or --description must be provided. When --scopes is provided, it replaces the existing scopes entirely.

Available scopes

ScopeDescription
deploy:use-caseDeploy use cases, upload documents, and read metadata
projects:createCreate new projects via API
projects:readList and inspect project details
workflows:triggerTrigger workflows and poll execution status
executions:readList and read execution details
instances:readRead process instance details
instances:manageActivate, deactivate, and manage instances
skills:readDownload agent skill documents
integrations:manageCreate, delete, and list integrations
api-keys:manageCreate and manage organization API keys

Examples

# Update scopes
codika organization update-key --key-id abc123 --scopes deploy:use-case,instances:read,projects:read

# Rename a key
codika organization update-key --key-id abc123 --name "Production Deploy Key"

# Update description
codika organization update-key --key-id abc123 --description "Used by CI/CD pipeline"

# Multiple fields at once
codika organization update-key --key-id abc123 --name "Full Access" --scopes deploy:use-case,instances:read,instances:manage

# JSON output
codika organization update-key --key-id abc123 --scopes deploy:use-case --json

Output

Human-readable (default)

✓ API key updated

  Key ID:       abc123
  Name:         Production Deploy Key
  Scopes:       deploy:use-case, instances:read, projects:read

JSON output (--json)

{
  "success": true,
  "data": {
    "keyId": "abc123",
    "name": "Production Deploy Key",
    "description": "Used by CI/CD pipeline",
    "scopes": ["deploy:use-case", "instances:read", "projects:read"],
    "updatedAt": "2026-03-31T14:00:00.000Z"
  },
  "requestId": "019d312f-..."
}

Exit codes

CodeMeaning
0Success
1API error (key not found, insufficient permissions, invalid scopes)
2CLI validation error (missing key ID, missing API key)