TokenCreated

The `TokenCreated` entity.

Definition

TypeScript
interface TokenCreated {
  id: string;
  key: string;
  keyHint: string;
  type: "session";
  workspaceId: string;
  scopes: {
    operations?: Array<string> | undefined;
    entityIds?: Array<string> | undefined;
  };
  expiresAt: string;
}

Fields

FieldTypeNotes
idstringreadonly required
keystringrequired — Full plaintext session token value — returned only once at creation time.
keyHintstringrequired — Last few characters of the token, safe to display.
type"session"required — Always 'session' for tokens.
workspaceIdstringrequired — Workspace the token is scoped to.
scopes{ operations?: Array<string> | undefined; entityIds?: Array<string> | undefined; }required — Operation and entity scopes the token is restricted to.
expiresAtstringrequired — ISO-8601 timestamp after which the token is rejected.