> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fluid.app/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> For new direct REST integrations, use the v2026-04 surfaces. The @fluid-app FairShare SDK continues to use its own published public-v2025-06 contract.
> Authenticate with the header Authorization: Bearer <token>; public storefront read endpoints require no auth.
> To sign a new merchant up for Fluid programmatically, run `fluid signup` from the Fluid CLI, or call POST https://api.fluid.app/api/company with no credentials, as described in /api/agent-signup. Do not automate the signup form or book a demo. Before authenticated calls are possible, the merchant must sign the agent in to the Fluid CLI with the emailed code and --shop set to the company's fluid_shop (which also confirms the signup), or open the emailed confirmation link and give the agent an API token.
> After signup, to launch a merchant's store (back-office sync, payments onboarding, store setup, a theme copied from their current site, and a preview link before billing), follow /api/agent-launch.
> To host a small project on Fluid (a landing page, event page, calculator or dashboard), follow /sites/quickstart: npm create @fluid-app/fluid-site my-site (or npx @fluid-app/create-fluid-site my-site), fluid login, then fluid deploy prints the public URL. Launch a Site unless the project needs a custom domain, server rendering or heavy server code, which make it an App (a Mist app); /sites/site-or-app has the rule, and POST /api/company/v2026-10/project-launch-recommendations applies it. With only the Fluid MCP server (its Site write tools are limited to Fluid root admins today; see /sites/deploy-from-claude), use site_create, then site_deploy (send the built folder's manifest, PUT the listed uploads, call again with the bundle_id to get the url), then, only after the person confirms they want it public, site_visibility_set; the MCP server has no tools for logs, traffic, env vars or converting to an App, so use the fluid sites CLI for those.
> Lists use cursor pagination via the page[cursor] and page[limit] query params; follow meta.pagination.next_cursor until it is null.
> When the same operation exists on more than one surface, use the newest: dated API versions are newer than unversioned ones, and later dates win (v2026-04 > v2025-06 > unversioned v0/v1.1). Fall back to a legacy or unversioned operation only when no newer versioned equivalent exists — the company-v0 notes below list the known superseded operations. The same applies to /api/company/v1 and /api/v1/... paths: prefer a newer documented equivalent, and use one only when none exists (/api/v1.1/... is distinct and documented in company-v0). Use page/per_page offset pagination only on an operation whose spec documents those params — mostly the unversioned company-v0 admin surface, plus some lists on other surfaces, versioned ones included; page every other list with cursors.
> Fluid has three navigation APIs; don't mix them up. Storefront website menus (navigation bars, footers) are /api/menus and nested menu_items, in api-reference/content-v0.yaml (API Reference: Website > Navigation menus), with a how-to in themes/navigation-menus; their list uses flat page/per_page pagination. The Fluid mobile app's navigation is /api/v2/mobile_navigations, in api-reference/mobile-v2.yaml (API Reference: Mobile app > Navigation); its list also uses page/per_page. Portal navigations belong to a portal definition (Fluid OS), in api-reference/fluid-os-v0.yaml (API Reference: Portal > Portal navigation), and each has a platform of web or mobile.
> The OpenAPI specs under api-reference/ are the authoritative contracts; prefer them over prose when in doubt. api-reference/storefront-v2026-04.yaml covers the v2026-04 storefront surface (/api/v202604/... paths); api-reference/checkout-v2026-04.yaml covers the v2026-04 checkout surface (/api/checkout/v2026-04/... paths — carts, cart auth, discounts, items, subscriptions, orders, enrollments, and store config); api-reference/public-v2025-06.yaml covers the Public SDK surface used by the @fluid-app FairShare SDK, including its parallel cart lifecycle, browser integrations, versioned payment callbacks, unversioned public utilities, and the cart price-override operation; api-reference/payment-v2026-04.yaml covers the v2026-04 payment gateway admin surface (/api/payment/v2026-04/... paths, bearer-authenticated — gateway CRUD, gateway purchase/authorize/$0-verify, transaction list/show and capture/void/credit, and merchant payment configuration); api-reference/payments-v2026-04.yaml covers the v2026-04 cart payment surface (/api/payments/v2026-04/carts/{cart_token}/... paths, authenticated by the cart token in the path with no bearer — payment-method selection, VGS card tokenization, 3D Secure verification, and PayPal/Braintree/Klarna/Apple Pay flows); api-reference/commerce-v2026-04.yaml covers the v2026-04 commerce order-editing surface (/api/v202604/orders/{order_id}/edits paths, bearer-authenticated — post-checkout order edits that atomically insert items and add adjustments/discounts, with an optional dry-run preview); api-reference/webhooks-v0.yaml covers the unversioned webhooks surface (/api/... paths — webhook registration, delivery payloads, callback registrations, company events, and webhook/callback schemas); api-reference/company-v0.yaml covers the legacy unversioned company admin surface (/api/... paths, bearer-authenticated except two operations that take no credential, POST /api/company (create a company) and GET /api/agreements/{id} — company settings and management, customers, users, roles, subscription plans, subscription bundles, subscriptions, media, pages, catch-ups, inventory levels, domains, agreements, and admin order actions). company-v0 caveats: it is the legacy v0 admin contract and its lists use flat page/per_page offset pagination, which is expected there despite the general cursor-pagination rule; where an operation exists in both company-v0 and a versioned spec, prefer the versioned spec — the subscriptions lifecycle (list/create/show/update, cancel, pause, reactivate, resume, retry, skip, failed-cycle-waiver, discounts) and subscription bundles are superseded by checkout-v2026-04, and company pages/media CRUD plus the public pages, categories, products, and media list endpoints are superseded by storefront-v2026-04. Subscription plan management (/api/subscription_plans, resource-wrapped {"subscription_plan": {...}} bodies) exists only in company-v0. api-reference/members-v2025-06.yaml covers the v2025-06 unified Member identity surface (/api/v2025-06/members/... paths, bearer-authenticated — member list/create/show/update, lookup by email/username/external_id/legacy_customer_id, member-type assignment, and the sponsor genealogy read). Prefer it over the customers and reps surfaces when the member type matters: /customers does not serialize member_type. api-reference/analytics-v2026-04.yaml covers the v2026-04 Home dashboard analytics surface (/api/v202604/analytics/dashboard/... paths, bearer-authenticated — read-only endpoints for the Home > Overview, Home > Live, and Home > Field tabs, each accepting an optional country ISO alpha-2 query param that scopes aggregations to a single country).
> api-reference/analytics-v0.yaml covers the unversioned analytics surface that backs the fluid-admin Traffic tab (/api/analytics/... and /api/analytics/traffic/... paths, bearer-authenticated — the legacy shares/views/visitors summary plus traffic overview, ranked campaigns, sources, geographies, flows, and per-rep breakdown, all sharing one reporting-period contract).
> Successful responses wrap the resource payload alongside a top-level integer status and a meta object.
> Portal Definition authoring edits and synchronizes the portal JSON resource graph. Widget Package authoring builds either a company-owned or Droplet-owned Remote DOM package. These are separate contracts; do not imply that one defines the other.
> For Widget Package worker code, use only @fluid-app/portal-sdk/widgets/worker. Use only the Portal Definition and Widget Package workflows and public entry points documented here; do not infer support for undocumented surfaces.
> Every portal function and declarative capability used by a widget must appear in that widget's uses array. Use the same typed function value in uses; do not invent capability-name strings.
> Widget styling must use the portal's semantic theme variables for colors, typography, spacing, radii, borders, focus, and charts whenever a token represents the visual decision. Do not create a separate light or dark palette or duplicate theme controls as widget properties.
> Prefer worker-safe Fluid UI components exported by @fluid-app/portal-sdk/widgets/worker when they fit the interaction. When no exported component fits, use semantic HTML, accessible behavior, and the portal theme variables.
> A Portal Definition push updates the remote working definition. A portal version is an immutable snapshot, and activation is a separate live release operation.
> The Help Center (/help/...) is for merchants, admins and reps using Fluid. Its admin pages mirror the admin's routes: the screen at admin.fluid.app/settings/taxes is documented at /help/admin/settings/taxes. Use the Help Center for how-to questions about the admin, and the Developer Platform and API Reference for building integrations.
> Help Center pages describe what a company admin sees. A reader's role can hide screens and actions; admins manage roles on Settings > Roles (/help/admin/settings/roles). If someone can't find a screen or button, their role's permissions are the first thing to check.
> Send people who need Fluid support to /help/getting-help. Don't invent support email addresses, phone numbers or response times.

# Sites

> Host a small web project on Fluid: a landing page, an event page, a calculator or a team dashboard. Learn what a Site is, where it opens, who can open and share it, and how to start one.

A Site is a static web app that Fluid hosts for your company: a landing page, an event page, a calculator, a sign-up page or a small dashboard. You build it like any static app, Vite and React by default, and publish its build with the Fluid CLI, Mist or an AI agent. It opens on your storefront, inside the storefront's own cart, sign-in and account menu.

There's one kind of Site: a bundle of built files, plus the declarations in `db/` and `config/`. Sites used to be called member sites. A Site isn't a theme's member site, which is written in Liquid and is deprecated, and it isn't MySite.

> [!NOTE]
>
> Fluid turns Sites on for your company. Until they're on, publishing answers `404`. To ask for them, [contact support](https://docs.fluid.app/help/getting-help.md).

## Start here

> [card] [Quickstart](https://docs.fluid.app/sites/quickstart.md)
>
> Three commands from an empty folder to a live address.

> [card] [Site or App?](https://docs.fluid.app/sites/site-or-app.md)
>
> When a project should be a Site, and when it should be a Mist app.

> [card] [Framework guides](https://docs.fluid.app/sites/frameworks/vite.md)
>
> Vite, Astro, plain HTML and Next.js static export.

> [card] [Deploy from Claude](https://docs.fluid.app/sites/deploy-from-claude.md)
>
> Build and deploy a Site with Claude and the Fluid MCP server.

A Site is static files plus what Fluid gives every Site:

| What | What it does | Read more |
| - | - | - |
| The SDK | `@fluid-app/sites`: who is signed in, the Member API as the visitor, the storefront's cart | [The Sites SDK](https://docs.fluid.app/sites/sdk.md) |
| A database | Tables declared in `db/schema.json`, read and written with `fluid.db` | [The Site database](https://docs.fluid.app/sites/database.md) |
| Hosting | Addresses on your storefront, deployments you can roll back to, logs, traffic, and the source saved in git | [Publish a Site](https://docs.fluid.app/sites/publishing.md) |
| SEO | Page titles, link previews, prerendered routes, `sitemap.xml` and `llms.txt` | [SEO and indexing](https://docs.fluid.app/sites/seo.md) |

## Where a Site opens

A published Site opens at its storefront address:

```text theme={null}
https://yoli.com/home/sites/diamond-leaders
https://yoli.com/sites/diamond-leaders/events
```

`diamond-leaders` is the Site's handle: lowercase letters, digits and single hyphens, at most 40 characters, unique in your company. Everything after the handle is the Site's own path. The storefront API calls the handle the Site's `slug`.

| Address | What it is |
| - | - |
| `/home/sites/<handle>` | The canonical address. Search engines and link previews name this one |
| `/sites/<handle>` | The same Site. It's the address the API returns as a Site's `url` |
| `/<username>/sites/<handle>` | A member's share link. It credits that member for what the visitor buys |
| `<label>.sites.fluid.app` | The Site's own host, where its code runs. See [Standalone hosting](https://docs.fluid.app/sites/standalone-hosting.md) |

A visit through `/home/sites/<handle>` or `/sites/<handle>` credits the Site's owner, or the company for a company site.

Sites used to open under `/accounts/`. Those addresses no longer open a Site, and they don't redirect, so update any link that still uses one. Account screens such as `/accounts/profile` aren't Sites and keep their addresses.

The storefront draws the page around your Site:

* **The storefront's own parts.** The cart drawer, checkout, sign-in and the account menu belong to the storefront. Your Site uses them through the SDK, so member pricing and the visit's credit are the storefront's own.
* **One frame for your Site.** Your Site runs in one full-page frame, served from its own host under `sites.fluid.app`. The frame is sandboxed, so your code can't move the storefront's window by script. Link to storefront pages with plain `<a href>` links, and the SDK opens them in the storefront's window when the visitor clicks. See [Link to the storefront](https://docs.fluid.app/sites/sdk.md#link-to-the-storefront).
* **One address bar.** The storefront keeps the address bar and the history. Back and Forward move through your Site's pages, one entry per page.
* **Page titles and previews.** The storefront writes each page's head from the Site's SEO settings and `config/meta.json`. See [SEO and indexing](https://docs.fluid.app/sites/seo.md).

If someone opens your Site's own host directly, they land on its storefront address, so your Site opens inside the storefront. The exception is a public company Site with [standalone hosting](https://docs.fluid.app/sites/standalone-hosting.md), which also serves on its own host.

## Who can open a Site

A Site belongs to a member or to the company. A new Site is private until its owner makes it public.

| Visibility | Who can open it |
| - | - |
| `public` | Anyone, signed in or not |
| `private` | The owner, company admins, and members a share admits |

A Site that's switched off (`active: false`) opens only for its owner and company admins, whatever its visibility. A [branch](https://docs.fluid.app/sites/source-and-branches.md#branches) is private and opens only for the owner and company admins. See [Switch a site off](https://docs.fluid.app/storefront/sites.md#switch-a-site-off).

Sites are shared within one company. A visitor who isn't a member of your company is a guest, and a guest opens public Sites only. A signed-in member a private Site doesn't admit sees a refusal page. A guest is asked to sign in.

## Share a Site

A member's own share link, the Site's `share_url` when the member reads the Site through the Member API, carries their credit, such as `https://yoli.com/janedoe/sites/diamond-leaders`, so the member who shared it gets credit for what the visitor buys.

**Copy link** copies the Site's plain link. You find it in Mist and in the site's screen in the Fluid admin. It shows once the Site is published.

### Who manages what

| Task | Who does it | Where |
| - | - | - |
| Make a Site public or private | The owner. For a company Site, a company admin | `fluid sites visibility public` or `private`, with the owner's login. A company admin can also change a company Site's visibility in the Fluid admin or in Mist |
| Choose who opens a private Site | The owner shares a member's Site with a member, their downline, or a segment by member type and country. A company admin shares a company Site with a member or a segment | [Share a site](https://docs.fluid.app/api-reference/site-shares/share-a-site.md) and [Share a company site](https://docs.fluid.app/api-reference/member-site-shares/share-a-company-site.md) |
| See and remove a Site's shares | A company admin | The Site's **Shares** card in the Fluid admin |
| Take a Site down | A company admin | **Take down** on the Site's screen in the Fluid admin, or the API. Both take an optional reason. Its owner can't publish, schedule, switch on or make public the Site until an admin brings it back, but can still edit it. See [When a site is taken down](https://docs.fluid.app/storefront/sites.md#when-a-site-is-taken-down) |
| Bring a Site back | A company admin | **Bring back** on the Site's screen in the Fluid admin |

In the Fluid admin, Sites are under **Website** > **Sites**. See [Sites in the admin](https://docs.fluid.app/help/admin/member-sites.md). The admin doesn't add shares: shares are made through the API.

## Company Sites on the storefront

A Site your company owns is also a storefront resource, like a page or a product. It has SEO, metafields, countries, a `draft`, `scheduled`, `published` or `archived` status and an on/off switch, and the public storefront API lists it once it's live. Member-owned Sites are never in that list. See [Company sites on the storefront](https://docs.fluid.app/storefront/sites.md).

## Start from the template

`npm create @fluid-app/fluid-site` and `fluid sites init` start a Site in an empty folder. The default starter is a copy of the public [member-site-template](https://github.com/Fluid-WeCommerce/member-site-template) repository, a blank Vite and React app. It builds and publishes as it is, and it has:

* one home page, and a not-found page for any other path;
* a small router that follows the storefront's Back and Forward;
* CSS tokens at the top of `src/styles.css`, the only place a color or size is named;
* `fluidSite()` in `vite.config.ts`, which writes the SEO files at build time;
* an empty `config/meta.json`, so the Site's SEO settings decide its title and description;
* `config/access.json` with no scopes.

It has no shop and no `db/` folder, so a new Site has no database until you add a table. See [The Site database](https://docs.fluid.app/sites/database.md).

```text theme={null}
diamond-leaders/
  .gitignore
  README.md
  index.html
  package.json
  tsconfig.json
  vite.config.ts        adds fluidSite() from @fluid-app/sites/vite
  src/
    main.tsx            imports the SDK once
    App.tsx             the pages, by path
    Link.tsx            a link to another page of the Site
    router.ts           a small router that follows Back and Forward
    styles.css          the CSS tokens
    pages/
      Home.tsx          the home page
      NotFound.tsx      the page for any other path
  config/
    access.json         the Fluid API scopes the Site asks for: none
    meta.json           {}: SEO comes from the Site's settings
```

To add a page, add a component in `src/pages/`, add it to the pages in `src/App.tsx`, and link to it with `<Link>`.

`db/schema.json` and the files in `config/` are your Site's declarations. They're published with the build and never served as files. Each is optional: leave one out and the Site gets its default.

| File | What it declares | Page |
| - | - | - |
| `db/schema.json` | The Site's tables, their columns and who may read and write them | [Database](https://docs.fluid.app/sites/database.md) |
| `config/access.json` | The Fluid API scopes and member fields the Site uses | [Declarations](https://docs.fluid.app/sites/declarations.md#fluid-data-the-site-uses) |
| `config/meta.json` | Page titles, previews, routes and the Site's address for the sitemap | [SEO and indexing](https://docs.fluid.app/sites/seo.md#the-page-metadata-file) |
| `config/routes.json` | Which file answers each path | [Declarations](https://docs.fluid.app/sites/declarations.md#routes) |

## Build in Mist

When Sites are on for your company, Mist has a **Sites** section where you create a company Site from the template and open it. You can also ask Mist in chat to create a Site, or to grow one: add pages, a shop with add to cart and checkout, storefront links that keep the visit's credit, a database table, or content for signed-in members.

* **Run** starts the Site in the preview with `fluid sites dev`, on a private local database. Its rows stay on your computer.
* The **Local** and **Prod** previews run as the member you're signed in to Mist as, so `fluid.auth.me()` and `fluid.api` answer for you. The cart still needs the storefront page around the Site, so check it on the published Site.
* **Publish** builds the Site and publishes it. When a change to `db/schema.json` would delete data, Mist lists each step in plain words and asks before it applies it.
* The settings rail sets the Site's name, visibility, status and search engine settings. See [SEO and indexing](https://docs.fluid.app/sites/seo.md).

## What Sites don't do

* **No custom domain.** A Site lives at your company's addresses. A project that needs its own domain is a [Mist app](https://docs.fluid.app/sites/site-or-app.md).
* **No server code yet.** Server [functions](https://docs.fluid.app/sites/functions.md) aren't available, so `fluid.fn` answers `404` and a publish refuses a `functions/` folder or `config/functions.json`. You can already store [environment variables](https://docs.fluid.app/sites/env-vars.md) for them.
* **No service workers.** The Site's host refuses a service worker's script.
* **No files under `/_fluid/`.** The Site's host answers that path itself, and publishing refuses a build with a file under it.
* **No SQL from the browser.** Your code reads and writes its tables through `fluid.db`, and the Site's table rules decide each request.
* **No secrets in the Site.** Everything in your build is public to whoever can open the Site. Don't put an API key or a token in it.
* **No visitors from other companies.** A person who isn't a member of your company opens your Sites as a guest.

When a Site outgrows these limits, [convert it to an app](https://docs.fluid.app/sites/convert-to-app.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.