v2

latestOpenAPI 3.1.02026-07-2615946107.7 KB
Workspaces

Mint a workspace Agent token

Mints a non-human, workspace-scoped Agent token (prefix sot_). Creates a headless service principal and adds it as a first-class workspace member that owns the artifacts it publishes. Plaintext token is returned exactly once. Owner/admin only.

post/v1/workspaces/{workspaceId}/agent-tokens

Request body

namestring required

Human label, e.g. "CI bot".

scopesstring[] required
expires_atstring nullable

Optional ISO datetime; omit for no expiry.

Response

Token minted (plaintext shown once)

okboolean
tokenstring
shown_onceboolean
token_idstring
principal_user_idstring
scopesstring[]

Example response

{
  "token": "sot_…"
}