> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> 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`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - 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: Collections



## Article: Introduction

## Article Link: https://dev.wix.com/docs/velo/apis/wix-data-v2/collections/introduction.md

## Article Content:

---
title: Introduction
---

# About the Data Collections API

The Data Collections API enables you to create, delete, and modify the structure of data collections in a Wix site.

## Data collections and their structure
Wix sites store data in collections.
A collection determines the structure of the data to be stored, defining the fields each item should contain and the data type of each field.
You can [create and modify collections](https://support.wix.com/en/article/content-manager-creating-a-collection) for a site using the Content Management System(CMS).
With the Data Collections API, you can also use code to create, modify, and delete collections in a Wix site.
You can then store and retrieve data in these collections using [`wix-data`](https://www.wix.com/velo/reference/wix-data).

**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.

## Setting Collection Edit Permissions 

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 data 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 view data, and only the site owner to insert, update, and remove data, declare your permissions as follows:
* `insert`: `ADMIN`
* `update`: `ADMIN`
* `remove`: `ADMIN`
* `read`: `SITE_MEMBER`

## Function permissions information

Functions in the Wix Data v2 API are restricted and only run if you elevate permissions using the `wix-auth` [`elevate()`](https://www.wix.com/velo/reference/wix-auth/elevate) function.

<blockquote class='warning'>
<p><strong>Warning:</strong> Elevating a function allows it to be called by any site visitor. Exercise caution to prevent security vulnerabilities.</p>
</blockquote>