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

AuthService

View Markdown

POST /spin.v1.AuthService/ApproveWorkspaceSignIn

Request

FieldTypeWhat it is
requeststringFrom BeginWorkspaceSignInResponse.approve_url.

Response

FieldTypeWhat it is
callbackUrlstringThe workspace host’s callback with the one-time code, for the browser to be sent to.

POST /spin.v1.AuthService/BeginWorkspaceSignIn

A sign-in on a workspace’s host, done by the dashboard. The proxy begins it and sends the browser to the dashboard, which approves it for whoever is signed in there and sends the browser back with a one-time code; the proxy completes it with that code and the binding it gave the same browser. The identity provider is only ever told the dashboard’s callback.

Request

FieldTypeWhat it is
hoststringThe workspace’s host the browser asked for, as the proxy received it: <name>.ws.<domain>. The code comes back to this host and to no other.
returnPathstringWhere on that host the browser goes once it is signed in: a path, never a URL.

Response

FieldTypeWhat it is
approveUrlstringThe dashboard’s page that approves this sign-in, for the browser to be sent to.
bindingstringA secret for the browser that began this sign-in, kept where only the proxy reads it: CompleteWorkspaceSignIn requires it with the code, so a code opened in another browser - one somebody was sent a link to - signs nobody in.

POST /spin.v1.AuthService/CheckDeviceLogin

Check device login status (CLI polls this) Returns session token once user has completed login and entered the code

Request

FieldTypeWhat it is
deviceCodestringThe device_code from StartDeviceLogin

Response

FieldTypeWhat it is
statusDeviceLoginStatusStatus of the device login
userUserOnly set when status is DEVICE_LOGIN_STATUS_COMPLETE
sessionTokenstring
expiresAtTimestamp

POST /spin.v1.AuthService/CompleteLogin

Complete login (callback from IdP)

Request

FieldTypeWhat it is
codestringOAuth/OIDC code
statestringCSRF state token (contains provider info)
bindingstringStartLoginResponse.binding for this state

Response

FieldTypeWhat it is
userUser
sessionTokenstring
expiresAtTimestamp

POST /spin.v1.AuthService/CompleteWorkspaceSignIn

Request

FieldTypeWhat it is
codestring
bindingstringBeginWorkspaceSignInResponse.binding, as the browser presented it.
hoststringThe host the callback arrived on, which must be the one the sign-in began on.

Response

FieldTypeWhat it is
sessionTokenstring
expiresAtTimestamp
returnPathstring

POST /spin.v1.AuthService/ConfirmDeviceLogin

Complete device login (dashboard calls this after user enters code) Requires authentication - links the device code to the current user

Request

FieldTypeWhat it is
userCodestringThe user code entered by the user (e.g., “ABCD-1234”)

Response

No fields: {}.

POST /spin.v1.AuthService/CreateAPIKey

Create API key

Request

FieldTypeWhat it is
namestring
scopeslist of stringe.g., [“workspace:read”, “workspace:write”]
expiresAtTimestamp

Response

FieldTypeWhat it is
apiKeyAPIKey
secretstringOnly shown once

POST /spin.v1.AuthService/GetCurrentUser

Get current user info

Request

No fields: {}.

Response

FieldTypeWhat it is
userUser
controlPlaneVersionstringThe release of the control plane that answered, which is the release of the dashboard asking: the bundle is served from inside that binary. It rides here rather than on an endpoint of its own because every session asks this once, and because a version an installation will be matched against known flaws by is not something to hand out unauthenticated.

POST /spin.v1.AuthService/ListAPIKeys

List API keys

Request

FieldTypeWhat it is
pagePageRequest

Response

FieldTypeWhat it is
apiKeyslist of APIKey
pagePageResponse

POST /spin.v1.AuthService/ListIdentityProviders

List available identity providers (for login page) Always includes built-in GitHub provider; additional OIDC providers from database

Request

No fields: {}.

Response

FieldTypeWhat it is
providerslist of IdentityProvider

POST /spin.v1.AuthService/Logout

Logout (invalidate session)

Request

No fields: {}.

Response

No fields: {}.

POST /spin.v1.AuthService/RevokeAPIKey

Revoke API key

Request

FieldTypeWhat it is
idstring

Response

No fields: {}.

POST /spin.v1.AuthService/SearchUsers

Search users by name or email (for team member selection, workspace sharing)

Request

FieldTypeWhat it is
querystringSearch by name or email
limitinteger (int32)Max results (default 10)
excludeTeamIdstringExclude users already in this team

Response

FieldTypeWhat it is
userslist of User

POST /spin.v1.AuthService/StartDeviceLogin

Start device login flow (for CLI when OAuth redirect is not available) Returns a user code and verification URL. User visits URL and enters code.

Request

FieldTypeWhat it is
identityProviderIdstringOptional: use default if empty

Response

FieldTypeWhat it is
deviceCodestringSecret code for CLI to poll with
userCodestringShort code user enters (e.g., “ABCD-1234”)
verificationUrlstringURL user visits to login
expiresIninteger (int32)Seconds until codes expire
intervalinteger (int32)Seconds between poll attempts

POST /spin.v1.AuthService/StartLogin

Start login flow with a specific identity provider Use “github” for built-in GitHub auth, or IdP ID for dynamic providers

Request

FieldTypeWhat it is
identityProviderIdstringID of the identity provider to use
redirectUristringWhere the identity provider sends the code: the dashboard’s /auth/callback, over https. Anything else is refused.

Response

FieldTypeWhat it is
authUrlstringURL to redirect user to
statestringCSRF state token
bindingstringA secret for the client that began this sign-in, and for nobody else: CompleteLogin requires it with the state. The state and the code come back in a URL, which somebody who signed in to their own account can send to anybody - and without this, whoever opens it is signed in as them. Kept where only this client reads it, never in a URL.

Generated by task reference from spin/internal/controlplane/apidocs/spin.v1.openapi.json at 8eee32b9d.

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