Tokens
REST endpoints for tokens. Bearer-auth required.
POST /api/tokens
Create session token
Creates a short-lived session token scoped to a project and operations. Requires private key (prv_) auth. Max lifetime 24 hours.
Request body
JSON
{
"workspaceId": "string",
"scopes": {
"operations?": ["<...>"],
"entityIds?": ["<...>"]
},
"expiresIn?": "string",
"metadata?": {}
}Response
JSON
{
"id": "string",
"key": "string",
"keyHint": "string",
"type": "session",
"workspaceId": "string",
"scopes": {
"operations?": ["<...>"],
"entityIds?": ["<...>"]
},
"expiresAt": "string"
}