Skip to main content

When to use

  • User wants to create a new organization for a team or client
  • Setting up a new workspace before creating projects and deploying use cases
  • Automating org provisioning via scripts or agents

Prerequisites

  • codika CLI installed and authenticated
  • Personal key (ckp_) or admin key (cka_) with organizations:create scope

Command

codika organization create [options]

Options

OptionRequiredDescriptionDefault
--name <name>YesOrganization name (2-100 characters)
--description <desc>NoOrganization description
--size <size>NoOrganization size
--logo <path>NoPath to a logo image file (JPEG, PNG, or WebP, max 5MB). Uploaded to platform storage.
--n8n-base-url <url>NoSelf-hosted n8n instance URLPlatform default
--n8n-api-key <key>NoSelf-hosted n8n API keyPlatform default
--store-credential-copyNoStore encrypted credential backup in Codika (only with self-hosted n8n)false
--api-url <url>NoOverride API URL
--api-key <key>NoOverride API key
--profile <name>NoUse a specific profile instead of the active one
--jsonNoJSON output

Size values

solo, 2-10, 11-50, 51-200, 201-1000, 1000+

Behavior

  1. If --logo is provided, reads the file, base64-encodes it, and sends it to the API for upload to platform storage
  2. Calls the Codika platform API to create the organization
  3. The authenticated user becomes the organization owner
  4. Initializes free plan credits and n8n secrets
  5. If self-hosted n8n flags are provided, validates the credentials before creating

Examples

# Basic creation
codika organization create --name "Acme Corp"

# With description and size
codika organization create \
  --name "Acme Corp" \
  --description "Main workspace for Acme team" \
  --size "11-50"

# With a logo
codika organization create \
  --name "Acme Corp" \
  --logo ./acme-logo.png

# With self-hosted n8n
codika organization create \
  --name "Enterprise Client" \
  --n8n-base-url "https://n8n.enterprise.com" \
  --n8n-api-key "n8n_api_xxxxx"

# With self-hosted n8n and credential backup
codika organization create \
  --name "Enterprise Client" \
  --n8n-base-url "https://n8n.enterprise.com" \
  --n8n-api-key "n8n_api_xxxxx" \
  --store-credential-copy

# JSON output for scripting
codika organization create --name "Test Org" --json

Output

✓ Organization Created Successfully

  Organization ID: abc123-def456
  Request ID:      req-789

Exit codes

CodeMeaning
0Success
1API error (auth, network, server)
2CLI validation error (e.g., missing --name)