> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dynamic.xyz/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# API Token Permissions

> Complete reference for API token permission scopes and their associated endpoints.

API tokens in Dynamic are scoped to specific resources and actions, ensuring that each token only has the minimum permissions necessary for its intended use case. This follows the principle of least privilege, enhancing security by limiting access to only what's required.

When creating an API token, you can select from the following permission scopes, organized by resource type:

## WaaS (Wallet as a Service) Permissions

### waas.authenticate

**Description:** Authenticate with WaaS (Wallet as a Service) for wallet operations.

| Method & Endpoint                                       | Description       |
| ------------------------------------------------------- | ----------------- |
| `POST` `/environments/:environmentId/waas/authenticate` | Authenticate WaaS |

### waas.delegatedAccess.signMessage

**Description:** Sign messages on behalf of users through delegated wallet access.

| Method & Endpoint                                                                | Description                      |
| -------------------------------------------------------------------------------- | -------------------------------- |
| `POST` `/environments/:environmentId/waas/:walletId/delegatedAccess/signMessage` | Delegate sign message for wallet |

## Environment Permissions

### environment.balances.read

**Description:** Read user balance information across multiple chains.

| Method & Endpoint                                            | Description                                |
| ------------------------------------------------------------ | ------------------------------------------ |
| `POST` `/environments/:environmentId/users/:userId/balances` | Get multichain account balances for a user |

### environment.apiTokens.read

**Description:** Read environment API token information.

| Method & Endpoint                           | Description                    |
| ------------------------------------------- | ------------------------------ |
| `GET` `/environments/:environmentId/tokens` | Get API tokens for environment |

### environment.apiTokens.write

**Description:** Create and manage environment API tokens.

| Method & Endpoint                                       | Description      |
| ------------------------------------------------------- | ---------------- |
| `POST` `/environments/:environmentId/tokens`            | Create API token |
| `DELETE` `/environments/:environmentId/tokens/:tokenId` | Delete API token |

### environment.events.read

**Description:** Read event data and event types for the environment.

| Method & Endpoint                                    | Description                |
| ---------------------------------------------------- | -------------------------- |
| `GET` `/eventTypes`                                  | Get event types            |
| `GET` `/environments/:environmentId/events`          | Get events for environment |
| `GET` `/environments/:environmentId/events/:eventId` | Get specific event         |

### environment.webhooks.read

**Description:** Read webhook configurations and message history.

| Method & Endpoint                                                            | Description                    |
| ---------------------------------------------------------------------------- | ------------------------------ |
| `GET` `/environments/:environmentId/webhooks`                                | Get webhooks for environment   |
| `GET` `/environments/:environmentId/webhooks/:webhookId`                     | Get specific webhook           |
| `GET` `/environments/:environmentId/webhooks/:webhookId/messages`            | Get webhook messages           |
| `GET` `/environments/:environmentId/webhooks/:webhookId/messages/:messageId` | Get webhook message deliveries |

### environment.webhooks.write

**Description:** Create, update, and manage webhook configurations.

| Method & Endpoint                                                                       | Description               |
| --------------------------------------------------------------------------------------- | ------------------------- |
| `POST` `/environments/:environmentId/webhooks`                                          | Create webhook            |
| `PUT` `/environments/:environmentId/webhooks/:webhookId`                                | Update webhook            |
| `DELETE` `/environments/:environmentId/webhooks/:webhookId`                             | Delete webhook            |
| `POST` `/environments/:environmentId/webhooks/:webhookId/messages/:messageId/redeliver` | Redeliver webhook message |

### environment.analytics.read

**Description:** Read analytics data including visits, wallets, and engagement metrics.

| Method & Endpoint                                               | Description                     |
| --------------------------------------------------------------- | ------------------------------- |
| `GET` `/environments/:environmentId/analytics/visits`           | Get daily sessions              |
| `GET` `/environments/:environmentId/analytics/wallets`          | Get wallets breakdown           |
| `GET` `/environments/:environmentId/analytics/overview`         | Get analytics overview          |
| `GET` `/environments/:environmentId/analytics/topline`          | Get analytics topline           |
| `GET` `/environments/:environmentId/analytics/engagement`       | Get analytics engagement        |
| `GET` `/environments/:environmentId/analytics/walletsBreakdown` | Get analytics wallets breakdown |

### environment.users.read

**Description:** Read user data, wallets, and related information.

| Method & Endpoint                                               | Description                         |
| --------------------------------------------------------------- | ----------------------------------- |
| `GET` `/oauthAccounts/:oauthAccountId/accessToken`              | Get OAuth access token              |
| `GET` `/environments/:environmentId/embeddedWalletVersions`     | Get active embedded wallet versions |
| `POST` `/users/:userId/wallets`                                 | Create wallet for user (deprecated) |
| `POST` `/environments/:environmentId/users/:userId/wallets`     | Create wallet for user              |
| `GET` `/users/:userId/wallets`                                  | Get wallets for user (deprecated)   |
| `GET` `/environments/:environmentId/users/:userId/wallets`      | Get wallets for user                |
| `GET` `/wallets/:walletId`                                      | Get wallet by ID (deprecated)       |
| `GET` `/environments/:environmentId/wallets/:walletId`          | Get wallet by ID                    |
| `GET` `/users/:userId`                                          | Get user by ID (deprecated)         |
| `GET` `/environments/:environmentId/users/:userId`              | Get user by ID                      |
| `GET` `/environments/:environmentId/users`                      | Get users for environment           |
| `GET` `/environments/:environmentId/exports`                    | Get environment exports             |
| `GET` `/environments/:environmentId/exports/:exportId/download` | Download export by ID               |
| `GET` `/environments/:environmentId/exports/:exportId`          | Get export by ID                    |

### environment.users.write

**Description:** Create, update, and manage users, wallets, and user-related data.

| Method & Endpoint                                                   | Description                       |
| ------------------------------------------------------------------- | --------------------------------- |
| `POST` `/environments/:environmentId/waas/create`                   | Create embedded wallet            |
| `DELETE` `/wallets/:walletId`                                       | Delete wallet (deprecated)        |
| `DELETE` `/environments/:environmentId/wallets/:walletId`           | Delete wallet                     |
| `DELETE` `/users/:userId`                                           | Delete user (deprecated)          |
| `DELETE` `/environments/:environmentId/users/:userId`               | Delete user                       |
| `POST` `/environments/:environmentId/users`                         | Create user                       |
| `POST` `/environments/:environmentId/users/bulk`                    | Bulk create users                 |
| `PUT` `/users/:userId`                                              | Update user (deprecated)          |
| `PUT` `/environments/:environmentId/users/:userId`                  | Update user                       |
| `POST` `/users/:userId/sessions/revoke`                             | Revoke user sessions (deprecated) |
| `POST` `/environments/:environmentId/users/:userId/sessions/revoke` | Revoke user sessions              |
| `PUT` `/sessions/:sessionId/revoke`                                 | Revoke specific session           |
| `POST` `/environments/:environmentId/exports`                       | Create export                     |

### environment.settings.read

**Description:** Read environment configuration settings including global wallets, custom fields, gates, providers, and more.

| Method & Endpoint                                                                     | Description                                 |
| ------------------------------------------------------------------------------------- | ------------------------------------------- |
| `GET` `/environments/:environmentId/globalWallet/settings`                            | Get global wallet settings                  |
| `GET` `/environments/:environmentId/globalWallet/accessControl`                       | Get global wallet access control list       |
| `GET` `/environments/:environmentId/globalWallet/connections`                         | Get global wallet connections               |
| `GET` `/environments/:environmentId/nameService/:chainName`                           | Get name service configuration by chain     |
| `GET` `/environments/:environmentId/test/account`                                     | Get test account                            |
| `GET` `/environments/:environmentId/custom/hostnames`                                 | Get custom hostnames for environment        |
| `GET` `/environments/:environmentId/custom/fields`                                    | Get custom fields for environment           |
| `GET` `/custom/fields/:customFieldId`                                                 | Get custom field by ID                      |
| `GET` `/environments/:environmentId/gates`                                            | Get environment gates                       |
| `GET` `/environments/:environmentId/gates/:gateId`                                    | Get specific gate                           |
| `GET` `/environments/:environmentId/settings/providers`                               | Get environment providers                   |
| `GET` `/settings/providers/:providerId`                                               | Get specific provider                       |
| `GET` `/environments/:environmentId/settings/exchanges`                               | Get environment exchanges                   |
| `GET` `/settings/exchanges/:exchangeId`                                               | Get specific exchange                       |
| `GET` `/environments/:environmentId/origins`                                          | Get origins for environment                 |
| `GET` `/environments/:environmentId/deeplinkUrls`                                     | Get deeplink URLs for environment           |
| `GET` `/environments/:environmentId/allowlists`                                       | Get allowlists for environment              |
| `GET` `/allowlists/:allowlistId`                                                      | Get specific allowlist                      |
| `GET` `/allowlists/:allowlistId/entries`                                              | Get allowlist entries                       |
| `GET` `/environments/:environmentId/integrations/chainalysis`                         | Get Chainalysis configuration               |
| `GET` `/environments/:environmentId/sdkViews`                                         | Get SDK views                               |
| `GET` `/environments/:environmentId/sdkViews/:viewType`                               | Get specific SDK view                       |
| `GET` `/environments/:environmentId/waas/delegatedAccess/encryptionPublicKeys`        | Get delegated access encryption public keys |
| `GET` `/environments/:environmentId/waas/delegatedAccess/encryptionPublicKeys/:keyId` | Get specific encryption public key          |
| `GET` `/environments/:environmentId/waas/policies`                                    | Get WaaS policies                           |
| `GET` `/environments/:environmentId/waas/:walletId`                                   | Get wallet by wallet ID                     |

### environment.settings.write

**Description:** Create, update, and manage environment configuration settings including global wallets, custom fields, gates, providers, and more.

| Method & Endpoint                                                                                             | Description                                   |
| ------------------------------------------------------------------------------------------------------------- | --------------------------------------------- |
| `POST` `/environments/:environmentId/globalWallet/settings`                                                   | Create global wallet settings                 |
| `PUT` `/environments/:environmentId/globalWallet/settings`                                                    | Update global wallet settings                 |
| `PUT` `/environments/:environmentId/globalWallet/enable`                                                      | Enable global wallet                          |
| `PUT` `/environments/:environmentId/globalWallet/disable`                                                     | Disable global wallet                         |
| `POST` `/environments/:environmentId/globalWallet/accessControl`                                              | Create global wallet access control           |
| `PUT` `/environments/:environmentId/globalWallet/accessControl`                                               | Update global wallet access control           |
| `PUT` `/environments/:environmentId/globalWallet/accessControl/enable`                                        | Enable global wallet access control           |
| `PUT` `/environments/:environmentId/globalWallet/accessControl/disable`                                       | Disable global wallet access control          |
| `POST` `/environments/:environmentId/globalWallet/accessControl/domains`                                      | Add global wallet access control domain       |
| `DELETE` `/environments/:environmentId/globalWallet/accessControl/domains/:globalWalletAccessControlDomainId` | Delete global wallet access control domain    |
| `POST` `/environments/:environmentId/nameService/:chainName/signingMessage`                                   | Fetch name service signing message            |
| `DELETE` `/environments/:environmentId/nameService/:chainName`                                                | Delete name service configuration             |
| `POST` `/environments/:environmentId/nameService/:chainName`                                                  | Create name service configuration             |
| `PUT` `/environments/:environmentId/nameService/:chainName/enable`                                            | Enable name service                           |
| `PUT` `/environments/:environmentId/nameService/:chainName/disable`                                           | Disable name service                          |
| `POST` `/environments/:environmentId/test/account`                                                            | Create test account                           |
| `DELETE` `/environments/:environmentId/test/account`                                                          | Delete test account                           |
| `POST` `/environments/:environmentId/custom/hostnames`                                                        | Create custom hostname                        |
| `DELETE` `/environments/:environmentId/custom/hostnames/:customHostnameId`                                    | Delete custom hostname                        |
| `POST` `/environments/:environmentId/custom/fields`                                                           | Create custom field                           |
| `PUT` `/custom/fields/:customFieldId`                                                                         | Update custom field                           |
| `DELETE` `/custom/fields/:customFieldId`                                                                      | Delete custom field                           |
| `POST` `/environments/:environmentId/gates`                                                                   | Create gate                                   |
| `PUT` `/environments/:environmentId/gates/:gateId`                                                            | Update gate                                   |
| `DELETE` `/environments/:environmentId/gates/:gateId`                                                         | Delete gate                                   |
| `PUT` `/environments/:environmentId/gates/:gateId/enable`                                                     | Enable gate                                   |
| `PUT` `/environments/:environmentId/gates/:gateId/disable`                                                    | Disable gate                                  |
| `POST` `/environments/:environmentId/settings/providers`                                                      | Create provider                               |
| `PUT` `/settings/providers/:providerId`                                                                       | Update provider                               |
| `DELETE` `/settings/providers/:providerId`                                                                    | Delete provider                               |
| `PUT` `/settings/providers/:providerId/enable`                                                                | Enable provider                               |
| `PUT` `/settings/providers/:providerId/disable`                                                               | Disable provider                              |
| `POST` `/environments/:environmentId/settings/exchanges`                                                      | Create exchange                               |
| `DELETE` `/settings/exchanges/:exchangeId`                                                                    | Delete exchange                               |
| `PUT` `/settings/exchanges/:exchangeId/enable`                                                                | Enable exchange                               |
| `PUT` `/settings/exchanges/:exchangeId/disable`                                                               | Disable exchange                              |
| `POST` `/environments/:environmentId/origins`                                                                 | Create origin                                 |
| `DELETE` `/origins/:originId`                                                                                 | Delete origin                                 |
| `POST` `/environments/:environmentId/deeplinkUrls`                                                            | Add deeplink URL                              |
| `DELETE` `/deeplinkUrls/:deeplinkUrlId`                                                                       | Delete deeplink URL                           |
| `POST` `/environments/:environmentId/allowlists`                                                              | Create allowlist                              |
| `DELETE` `/allowlists/:allowlistId`                                                                           | Delete allowlist                              |
| `PUT` `/allowlists/:allowlistId/enable`                                                                       | Enable allowlist                              |
| `PUT` `/allowlists/:allowlistId`                                                                              | Update allowlist                              |
| `PUT` `/allowlists/:allowlistId/disable`                                                                      | Disable allowlist                             |
| `POST` `/allowlists/:allowlistId/entries`                                                                     | Add allowlist entry                           |
| `DELETE` `/allowlistEntries/:allowlistEntryId`                                                                | Delete allowlist entry                        |
| `PUT` `/environments/:environmentId/sdkViews/:viewType`                                                       | Update SDK view                               |
| `POST` `/environments/:environmentId/waas/policies`                                                           | Create WaaS policy                            |
| `PUT` `/environments/:environmentId/waas/policies`                                                            | Update WaaS policy                            |
| `DELETE` `/environments/:environmentId/waas/policies`                                                         | Delete WaaS policy rules                      |
| `POST` `/environments/:environmentId/waas/delegatedAccess/encryptionPublicKeys`                               | Create delegated access encryption public key |
