> 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: Introduction



## Article: Introduction

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

## Article Content:

# About the Wix Data API

The Wix Data API provides a complete solution for accessing, organizing, configuring, and managing data stored in a Wix site's database.

With the Wix Data API, you can:

- Create, modify, and delete [data collections](https://www.wix.com/velo/reference/wix-data-v2/collections).
- Create [indexes](https://www.wix.com/velo/reference/wix-data-v2/indexes) for data collections, to speed up data queries.
- Connect [external databases](https://www.wix.com/velo/reference/wix-data-v2/externaldatabaseconnections) to a Wix site.

> **Note:** Use our existing [`wix-data`](https://www.wix.com/velo/reference/wix-data) API to access, manage, and perform aggregations on data stored in a site's existing data collections.

## Before you begin

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

- The maximum size of an item you can save to a collection is 500 kb.
- When naming fields in data collections, we recommend avoiding special characters. You can do this by using field names that match this regex pattern: `[a-zA-Z_][a-zA-Z0-9_-]{0,63}`.
- Each data collection defines a schema of fields for the items it contains. However, this schema 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 schema specification, your data is stored anyway.
- When using data retrieval functions following an update to a collection's data, the data retrieved may not yet contain the most recent changes. See [Wix Data and Eventual Consistency](https://www.wix.com/velo/reference/wix-data-v2/eventual-consistency) for more information and instructions for overriding this.
- After connecting external database collections to a Wix site using the [External Database Connections API](https://www.wix.com/velo/reference/wix-data-v2/externaldatabaseconnections), you can use [`wix-data`](https://www.wix.com/velo/reference/wix-data) to manage and retrieve data from those collections as if they were Wix Data collections.

### Request timeouts

When your site makes a data request, it may take some time to receive a response. Wix Data places limits on how long a response can take before the request times out. If the response time exceeds this limit, Wix Data returns an error instead of the intended result.

Request timeouts vary depending on your [Wix plan](https://www.wix.com/plans) and the type of collection you are attempting to access:

| Collection Type                                                                                                                                                             | Wix plan                                                    | Timeout    |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------- | ---------- |
| [CMS collections](https://support.wix.com/en/article/cms-formerly-content-manager-managing-your-collections)                                                                | Free sites, premium sites (excl. Elite and Business Elites) | 5 seconds  |
| [CMS collections](https://support.wix.com/en/article/cms-formerly-content-manager-managing-your-collections)                                                                | Business Elite & Elite Premium                              | 10 seconds |
| [External Database Collections](https://dev.wix.com/docs/develop-websites/articles/databases/external-databases/overview/integrating-external-databases-with-your-wix-site.md) | All plans                                                   | 15 seconds |

After the specified timeout, the request fails and the following error message is displayed in your [site logs](https://support.wix.com/en/article/velo-about-site-monitoring):

`WDE0028: Operation time limit exceeded.`

Learn more about [Wix Data error codes](https://dev.wix.com/docs/velo/api-reference/wix-data/error-codes.md).

## Terminology

- **Data collection:** A schema determining the structure of data items to be stored, defining the fields each item should contain and the data type of each field.
- **Data item:** A single data entry in a collection, in JSON format.
- **Index:** A map of a collection's data, organized according to selected fields. An index is used to increase query speed, and in some cases, to enforce unique values.
- **External database connection:** An adaptor that translates Wix data requests from a Wix site into an external database's protocol, and translates the response back into a format that Wix APIs can read. This enables Wix APIs, projects, and sites to treat the external database exactly as if it was an internal data collection.