Skip to main content
Add roles to a key without affecting existing roles or permissions. Use this for privilege upgrades, enabling new feature sets, or subscription changes that grant additional role-based capabilities. Direct permissions remain unchanged. Important: Changes take effect immediately with up to 30-second propagation across regions. Required permissions:
  • api.*.update_key (to update keys in any API)
  • api.<api_id>.update_key (to update keys in a specific API)
See the API reference for the full HTTP endpoint documentation.

Usage

Flags

string
required
The key ID to add roles to. This is the database identifier returned from createKey, do not confuse it with the actual API key string that users include in requests. Added roles supplement existing roles and permissions without replacing them. Role assignments take effect immediately but may take up to 30 seconds to propagate across all regions.
string[]
required
Comma-separated list of role names to add. Operations are idempotent, adding existing roles has no effect and causes no errors. All roles must already exist in the workspace; roles cannot be created automatically. Invalid roles cause the entire operation to fail atomically, ensuring consistent state.

Global Flags

Examples

Output

Default output shows the request ID, followed by the updated list of roles assigned to the key:
With --output=json, the full response envelope is returned:
Last modified on July 23, 2026