API Key Types & Access Levels

Understanding Kodey API key types and their access permissions

Kodey supports three types of API keys: team-level keys (publishable and secret) and user-level keys.

Key Types

Key TypePrefixScopeDescriptionWhere to Use
Publishable Keypk_live_TeamRestricted access - chat endpoints onlyFrontend/Client-side
Team Secret Keysk_live_TeamFull API access for a single teamBackend/Server-side
User Secret Keyusk_live_UserRoot access across all your teamsBackend/Server-side

Key Format Examples

Publishable:  pk_live_7Xk9mNpQ2rStUvWxYz3aBcDeFgHjKm
Team Secret:  sk_live_7Xk9mNpQ2rStUvWxYz3aBcDeFgHjKm
User Secret:  usk_live_7Xk9mNpQ2rStUvWxYz3aBcDeFgHjKm

Access Matrix

Endpoint Categorypk_live_sk_live_usk_live_
Chat OperationsYesYesYes
Agent OperationsNoYesYes
Workflow OperationsNoYesYes
MCP OperationsNoYesYes
File OperationsNoYesYes
Webhook OperationsNoYesYes
Team ManagementNoNoYes
Member ManagementNoNoYes
API Key ManagementNoNoYes
Billing OperationsNoNoYes
Team SettingsNoNoYes
Export/ImportNoNoYes

User Secret Key (usk_live_*)

User secret keys provide root access across all teams where you are an OWNER or ADMIN. This key type is ideal for:

  • Multi-team automation: Manage multiple teams with a single key
  • Team management: Create, update, and delete teams programmatically
  • Member operations: Invite members, manage roles, transfer ownership
  • Billing integration: Access invoices and billing operations
  • Data migration: Export and import team configurations

Generating a User Secret Key

User API keys can be generated from your Account Settings in the Kodey dashboard.

Key Differences from Team Secret Key

CapabilityTeam Secret (sk_live_)User Secret (usk_live_)
Access scopeSingle teamAll teams (OWNER/ADMIN)
Chat, Agent, Workflow APIsYesYes
Create new teamsNoYes
Delete teamsNoYes
Invite/remove membersNoYes
Edit member rolesNoYes
Transfer ownershipNoYes
View/regenerate API keysNoYes
Access billing & invoicesNoYes
Export/import team dataNoYes

Security Best Practices

Publishable Keys (pk_live_*)

  • Safe to expose in frontend code
  • Use for client-side chat integrations
  • Limited to chat-related endpoints only

Team Secret Keys (sk_live_*)

  • Never expose in frontend code
  • Store securely in environment variables
  • Use only in server-side applications
  • Provides full API access for a single team

User Secret Keys (usk_live_*)

  • Highest privilege level - treat with extreme care
  • Never expose in frontend code or public repositories
  • Store in secure secret management systems (AWS Secrets Manager, Vault, etc.)
  • Use for backend automation and admin operations only
  • Consider using team secret keys when user-level access isn't required