---
title: "TokenScopes"
description: "The `TokenScopes` entity."
section: "Reference"
group: "Types"
order: 237
---

## Definition

```ts
interface TokenScopes {
  operations?: Array<string> | undefined;
  entityIds?: Array<string> | undefined;
}
```

## Fields

| Field        | Type                         | Notes                                                                                 |
| ------------ | ---------------------------- | ------------------------------------------------------------------------------------- |
| `operations` | `Array<string> \| undefined` | `optional` — Allowed operation identifiers (e.g. 'agents.create'); omit to allow all. |
| `entityIds`  | `Array<string> \| undefined` | `optional` — Whitelist of entity IDs this token may act on; omit to allow all.        |
