> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction

## Article: Introduction

## Article Link: https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-permissions/introduction.md

## Article Content:

# About the Data Permissions API

> **Note for app developers:** Wix Data APIs require the site's [code editor](https://dev.wix.com/docs/develop-websites/articles/get-started/development-environments.md) to be enabled. If you are building a Wix app, add a [data collections extension](https://dev.wix.com/docs/build-apps/develop-your-app/extensions/backend-extensions/data-collections/about-data-collections-extensions.md) to automatically enable the code editor and create data collections when your app is installed on a site.


The Data Permissions API manages access control for [data collections](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection), allowing you to determine who can perform [actions on collection items](#item-actions). You can set [collection-level permissions](#collection-level-permissions) for each action, or grant [special permissions](#special-permissions) to specific Wix users or roles.

With the Data Permissions API, you can:

- [Update collection-level permissions](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-permissions/update-permissions.md) for [item actions](#item-actions).
- [Add special permissions](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-permissions/add-special-permissions.md) for specific Wix users or roles.
- [Retrieve the current permissions configuration](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-permissions/get-permissions.md) for a collection.
- [Check the current user's permissions](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-permissions/get-my-permissions.md) for a collection.

Learn more [about collection permissions](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction.md).

## Permission types

The Data Permissions API lets you manage 2 types of permissions:

### Collection-level permissions

Every data collection has a default set of [permissions](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction.md) that specify the minimum [user role](#user-roles) required to perform an [action on a collection item](#item-actions). To perform an action, the user must have the specified role or higher.

### Special permissions

You can [add special permissions](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-permissions/add-special-permissions.md) to specific users or [roles](https://support.wix.com/en/article/roles-permissions-overview#roles-and-permissions) that override collection-level permissions. Special permissions allow Wix users or roles to perform [actions on collection items](#item-actions) that they otherwise can't perform.

> **Note**: When you [remove special permissions](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-permissions/remove-special-permissions.md) from a Wix user or role, collection-level permissions apply instead.

## User roles

User roles serve as access levels that define which [actions](#item-actions) users can perform on collection items. Roles are hierarchical, so users with a particular role can also perform actions that require lower-access roles.

The following roles are listed by their access level in descending order:

- `PRIVILEGED`: Only site administrators and users with special permissions can perform the action.
- CMS_EDITOR: Wix users with [CMS roles](https://support.wix.com/en/article/roles-permissions-overview#roles-for-integrated-wix-apps) can perform the action.
- `SITE_MEMBER_AUTHOR`: Wix users must be [logged-in members](https://dev.wix.com/docs/rest/articles/get-started/about-identities.md#site-member) to perform the action, but they can only access items that they created.
- `SITE_MEMBER`: Wix users must be logged in to perform the action. This role includes [site members](https://dev.wix.com/docs/rest/articles/get-started/about-identities.md#site-member) and [collaborators](https://support.wix.com/en/article/inviting-people-to-contribute-to-your-site).
- `ANYONE`: Any site visitor can perform the action, including [site visitors](https://dev.wix.com/docs/rest/articles/get-started/about-identities.md#site-visitor).

For example, users who can perform actions restricted to a `CMS_EDITOR` role can also perform actions that require the `SITE_MEMBER_AUTHOR`, `SITE_MEMBER`, `ANYONE` roles.

## Item actions

You can allow or restrict Wix users from performing the following actions on collection items:

- **Item read**: View items in the collection.
- **Item insert**: Create new items in the collection.
- **Item update**: Update existing items in the collection.
- **Item remove**: Remove items from the collection.

## Before you begin

It's important to note the following before starting to code:

- The site must have a [data collection](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection) to update permissions for.
- You can only manage permissions for collections [created in the CMS](https://support.wix.com/en/article/cms-formerly-content-manager-creating-a-collection) or with the [Data Collections API](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction.md). You can't configure permissions for [Wix app collections](https://support.wix.com/en/article/cms-formerly-content-manager-working-with-wix-app-collections), [shared collections](https://support.wix.com/en/article/wix-enterprise-sharing-cms-collections-with-sites-and-templates), or [external collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site.md).

## Use cases

- [Set up member-only access for a collection](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-permissions/sample-flows.md)
- [Add special permissions to a custom user role](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-permissions/sample-flows.md)

## See also

- [About collection permissions in the CMS](https://support.wix.com/en/article/cms-collection-permissions-overview).
- [Roles and permissions for site collaborators](https://support.wix.com/en/article/roles-permissions-overview#roles-and-permissions).
- [Data Collections API](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction.md).
- [Data Items API](https://dev.wix.com/docs/rest/business-solutions/cms/data-items/introduction.md).

@sdk_package_setup