v1

latestOpenAPI 3.1.02026-08-047777149.4 KB
Service Account Tokens

Create a service account token

Create a dedicated service-account user scoped to this workspace and return a JWT (token field) usable as Authorization: Bearer <token> on PAPI and AgentFarm. The full token is returned once — store it securely. Caller must be a workspace admin.

post/api/v3/workspaces/{workspace}/service-account-tokens

Path parameters

workspacestring required

Workspace short name

Request body

namestring required

Human-readable label for the token

role'admin' | 'readwrite' | 'readandrun' | 'readandrunwithassistant' | 'readonly'

Workspace permission role granted to the token

expiresInDaysinteger nullable

Token lifetime in days. Omit for the platform default (~10 years).

Response

Token created (includes one-time JWT)

idstring uuid
namestring
tokenSuffixstring

Last 8 characters of the JWT for identification

createdByNamestring nullable
expiresAtstring date-time nullable
isRevokedboolean
isExpiredboolean
isActiveboolean
lastUsedAtstring date-time nullable
createdAtstring date-time
tokenstring required

Full JWT access token — shown once at creation; store securely.