What API keys can access
Organization API keys authenticate to platform APIs for the organization they were created in. The key inherits the creator’s organization role and access. That means a key created by an admin can access admin-level platform APIs, while a key created by a builder is limited to builder-level access. API keys can be sent as:?token= or ?api_key= query parameters. Prefer headers for new scripts.
API keys and the CLI
API keys have nothing to do with CLI access today. The CLI is authenticated and accessed at the user level, not with org-scoped API keys. When you runkeystroke auth login, you authenticate as a user. From there, the CLI can access every organization you belong to and switch between them. It is not scoped to a single organization the way an API key is.
So use API keys for scripts and external tools hitting the platform API, and use keystroke auth login for CLI work like keystroke deploy on your own machine. Hosted sessions (the in-app platform agent, MCP workspaces) are already authenticated and never run auth login.
Create a key
Create API keys from the web app or the CLI.Visibility and permissions
API key visibility depends on your organization role:
Any member can revoke their own keys. Owners and admins can revoke keys created by other members.
Revoke a key
Revoke a key when it is no longer needed, when a teammate leaves, or when you think the secret may have been exposed.Use keys in scripts
Store the key in an environment variable and pass it as a header:Next steps
Members
Understand the organization roles API keys inherit.
Organization
Manage organization-wide settings.
CLI reference
See the API key command reference.
Credentials
Store runtime credentials for agents and workflows.