The Data Collections API manages the structure of CMS collections on a site. A collection defines the fields, data types, item permissions, and plugins for its data items.
With the Data Collections API, you can:
Use the Data Items API to store and retrieve the items in these collections.
Wix sites store data in collections. A collection determines the structure of the data to be stored, defining the fields each item contains, and the data type of each field. Wix users can create and modify collections for their site using the Content Management System (CMS).
Note: In addition to user-created collections, some Wix business apps automatically create and manage CMS collections on the site. To learn about these, see Wix App Collections.
With the Data Collections API, you can use code to create, modify, and delete collections in a Wix site. You can then store and retrieve data in these collections using the Data Items API.
Note: The structure you define for a data collection isn't enforced. This means that if you add or update an item containing a field or data type that doesn't match the collection's structure, your data is stored anyway.
Access to a data collection is controlled by its permissions. These permissions are defined in the collection object and they specify which types of user can perform actions on the items contained in the collection.
Wix Data recognizes 4 roles:
ADMIN: The site owner.SITE_MEMBER_AUTHOR: A signed-in user who has added content to the collection.SITE_MEMBER: Any signed-in user.ANYONE: Any site visitor.For each of the 4 basic actions (inserting, updating, removing, and reading content) the minimal role required must be set. For example, if you want to allow only site members to read items, and only the site owner to insert, update, and remove items, set the collection permissions as follows:
insert: ADMINupdate: ADMINremove: ADMINread: SITE_MEMBERUse Patch Data Collection or Patch Data Collection Field to change selected properties while preserving the others. The field mask identifies which supported properties to change. When omitted in a REST request, the mask is inferred from the supplied object.
Update Data Collection replaces the collection definition. Update Data Collection Field replaces one field's definition while retaining other fields. Include every writable property you need to preserve when using these methods.
It's important to note the following points before starting to code:
Last updated: 29 October 2026