> 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: wix-realtime-frontend



## Article: Introduction

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

## Article Content:

# Introduction
> **Note**: This API is not supported in [Wix Blocks](https://dev.wix.com/docs/build-apps/develop-your-app/frameworks/wix-blocks/about-wix-blocks.md).

 Using the Realtime API you can create channels and channel resources where messages
 can be published. Site visitors who subscribe to a channel receive the messages
 published to that channel. When a message is received you can handle the message any
 way you choose, such as displaying the contents of the message or changing the state
 of page elements depending on the contents of the message. You can also manage the
 permissions of who can read from specific channels.

 The `wix-realtime-frontend` module is used in conjunction with the 
 [`wix-realtime-backend`](https://dev.wix.com/docs/velo/velo-only-apis/wix-realtime-backend/introduction.md) module.

 Get hands-on experience with the Realtime API on our [Hello Realtime](https://dev.wix.com/docs/coding-examples/getting-started/hello-world/hello-realtime.md) example page. 

 Typical uses of the Realtime API include implementing a messaging system or
 as an alternative to using a polling mechanism.

 The Realtime API uses the following terminology:

 + **Channel**: A specific channel on which messages are published. Each channel
   has a unique name. Site visitors can subscribe to a channel to receive the 
   messages that are published on it. When site visitors subscribe to a channel, they do not 
   receive messages published to a resource on that same channel.
 + **Channel resource**: A subchannel on which messages are published. Subchannels
   can share a name with a channel and other subchannels, but they have a unique
   resource ID. When site visitors subscribe to a channel resource, they do not 
   receive messages published to that same channel without a specified resource.
   Channel resources inherit their parent channel's permissions, unless specified
   otherwise.
 + **Message**: A message published on a channel or channel resource. A message can
   be of any type, such as a string, number, or object. Channel subscribers receive
   the messages published on the channel.
 + **Publish**: Sending a message over a channel or channel resource.
 + **Subscribe**: A site visitor subscribes to receive the messages published on a 
   channel or channel resource.
 
 For a tutorial on using the Realtime API, see 
 [Sending Messages with the Realtime API](https://support.wix.com/en/article/velo-tutorial-sending-messages-with-the-realtime-api).
 
 To use the Realtime API, import `wixRealtimeFrontend` from the `wix-realtime-frontend` module:

   ```javascript
   import wixRealtimeFrontend from 'wix-realtime-frontend';
   ```