Skip to content
Spinbox is experimental: APIs change and data may be lost. Status lists what is built and what proves it.

spin api-key

View Markdown
Manage API keys for programmatic access.
API keys can be used to authenticate with the Spinbox API without
needing an interactive login. Keys can be scoped to limit their
permissions.
Usage:
spin api-key [flags]
spin api-key [command]
Available Commands:
create Create a new API key
list List your API keys
revoke Revoke an API key
Flags:
-h, --help help for api-key
Global Flags:
--config string config file (default is $HOME/.spin/config.yaml)
-o, --output string text for a person, or json: one document of what the API answered, and no prose (default "text")
--profile string named profile to use; SPIN_PROFILE names it when this flag does not (default "default")
Use "spin api-key [command] --help" for more information about a command.
Create a new API key for programmatic access.
The secret key will only be shown once. Make sure to save it securely.
A key can do only what its scopes name, and needs at least one. It can never
create API keys, confirm a login, or administer the instance.
Available scopes:
workspace:read - Read workspaces, snapshots and ports
workspace:write - Create, start, stop and change workspaces; open a terminal
workspace:delete - Delete workspaces
team:read - Read teams and their members
team:write - Manage teams and members
settings:read - Read user settings and SSH keys
settings:write - Update user settings and SSH keys
Examples:
spin api-key create "Deploy Bot" --scope workspace:read --scope workspace:write
spin api-key create "Read Only" --scope workspace:read --expires 30d
Usage:
spin api-key create <name> [flags]
Flags:
--expires string How long the key lasts, at most a year: a whole number of d, w or y (30d, 2w, 1y), or a duration like 36h (default "90d")
-h, --help help for create
--scope strings Scopes for the key (can be repeated)
Global Flags:
--config string config file (default is $HOME/.spin/config.yaml)
-o, --output string text for a person, or json: one document of what the API answered, and no prose (default "text")
--profile string named profile to use; SPIN_PROFILE names it when this flag does not (default "default")
List your API keys
Usage:
spin api-key list [flags]
Flags:
-h, --help help for list
Global Flags:
--config string config file (default is $HOME/.spin/config.yaml)
-o, --output string text for a person, or json: one document of what the API answered, and no prose (default "text")
--profile string named profile to use; SPIN_PROFILE names it when this flag does not (default "default")
Revoke an API key
Usage:
spin api-key revoke <key-id> [flags]
Flags:
-h, --help help for revoke
-y, --yes Skip confirmation
Global Flags:
--config string config file (default is $HOME/.spin/config.yaml)
-o, --output string text for a person, or json: one document of what the API answered, and no prose (default "text")
--profile string named profile to use; SPIN_PROFILE names it when this flag does not (default "default")

Generated by task reference from spin/cmd/cli at 8eee32b9d.

Documents Spinbox v20261019.02. This page as Markdown, for a model or a terminal.