CreateTokenBody

The `CreateTokenBody` entity.

Definition

TypeScript
interface CreateTokenBody {
  workspaceId: string;
  scopes: {
    operations?: Array<string> | undefined;
    entityIds?: Array<string> | undefined;
  };
  expiresIn: string;
  metadata?: Record<string, unknown> | undefined;
}

Fields

FieldTypeNotes
workspaceIdstringrequired — Workspace the new token should be scoped to.
scopes{ operations?: Array<string> | undefined; entityIds?: Array<string> | undefined; }required — Operation and entity scopes to enforce on the token.
expiresInstringrequired — Duration (e.g. '1h', '30m', '24h')
metadataRecord<string, unknown> | undefinedoptional — User context passed to agents