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[=true|false] 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")
--traceparent string the W3C traceparent of the span this command is part of; its own span is sent to the installation unless the profile says telemetry: false
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
confirm a login or administer the instance. A key with keys:delegate makes keys of
its own, run with it as SPIN_TOKEN: each holds no more than it does - its scopes,
team, projects, end and bounds - and goes when it is revoked.
Available scopes:
workspace:read - Read workspaces, snapshots and ports
workspace:write - Create, start, stop and change workspaces; open a terminal
workspace:delete - Delete workspaces
workspace:exec - Run commands and read and write files in workspaces, as root;
made with your passkey, in the dashboard
keys:delegate - Make keys of its own, holding no more than it does
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[=true|false] help for create
--max-cores int32 How many cores their workspaces may hold on runners at once: a stopped one's do not count
--max-workspaces int32 How many workspaces the key and the keys it delegates may have on a runner at once: stopped ones do not count
--project strings A project whose workspaces the key reaches, by id (can be repeated; default: any)
--scope strings Scopes for the key (can be repeated)
--team string The one team whose workspaces the key reaches (default: every team you are in)
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")
--traceparent string the W3C traceparent of the span this command is part of; its own span is sent to the installation unless the profile says telemetry: false
List your API keys
Usage:
spin api-key list [flags]
Flags:
-h, --help[=true|false] 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")
--traceparent string the W3C traceparent of the span this command is part of; its own span is sent to the installation unless the profile says telemetry: false
Revoke an API key
Usage:
spin api-key revoke <key-id> [flags]
Flags:
-h, --help[=true|false] help for revoke
-y, --yes[=true|false] 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")
--traceparent string the W3C traceparent of the span this command is part of; its own span is sent to the installation unless the profile says telemetry: false

Generated by task reference from spin/cmd/cli at 51f7e0dea.

Installations run Spinbox v20261027.01; the reference is generated from spin v20261114.01 (51f7e0dea). This page as Markdown, for a model or a terminal.