<!-- Built by scripts/build-agent-docs.mjs from site/agents-src/workspaces.md: edit that file. -->
# Page Lemon workspaces and plan moves: guide for AI assistants

> For people: https://pagelemon.com/docs/workspaces explains this feature in plain words. This page is for AI assistants.

A workspace is the shared home of a business's sites: one plan for the whole workspace (the Company plan, a flat price, not per seat), a Workspace Owner who pays, Workspace Admins who manage people, Workspace Developers who change every site with their own login and AI, and custom groups for people who should reach only some sites or do only some things. This guide covers starting a workspace, moving personal sites into it, adding people, and the way out: leaving the Company plan, the freeze, and reactivating. Publishing in general: https://pagelemon.com/agents.

Use this when the person says "We're a team now, move my sites into a workspace", "Add my colleague so she can edit the site", "Who can add people?", "Let our client see all our sites without editing", "We're cancelling our Company plan, what happens to the sites?" or "Bring the workspace back". One person helping on a personal site is https://pagelemon.com/agents/co-editing. Giving one site away is https://pagelemon.com/agents/transfer.

## Plans and limits

Workspaces are on the workspace (business) plans. Seats (people in the workspace, the Workspace Owner included), live sites, custom domains, notification inboxes, site emails a day, bookings, staff and rooms, version history and the activity log depend on the plan: https://pagelemon.com/pricing. The workspace's own numbers: `get_account` gives each workspace's `seats_used`, `seats_limit`, `sites_used` and `sites_limit` to its Owner and Admins (`include: ["usage"]` and `["storage"]` add the rest).

- Who counts as a seat: everyone in the workspace (the Workspace Owner, every Workspace Admin, Workspace Developer and everyone in a group) and every unexpired invite (an invite lasts 30 days and holds its seat). At the seat number an invite is refused with an `agent_message` that names it and `pricing_url`: pass it on, don't retry.
- **Roles:** the **Workspace Owner** does everything, billing included. A **Workspace Admin** does everything on every site (form replies, bookings, orders and users included), invites, changes and removes people and manages groups, but never billing, payouts, notification settings, deleting or handing over the workspace. A **Workspace Developer** changes and publishes every site, and never sees app data, form replies, bookings, orders, people or settings. A **custom** person has only what their groups give.
- **Custom groups** (named by the Workspace Owner or an Admin): each group has permissions (View the site, Change the site, View users, Edit users, Manage the AI key, Scan users) on all sites or chosen ones, up to 50 groups a workspace. A new group has none. Manage the AI key needs View users (`400`, `permissions_ai_key_needs_view`). A person's rights on a site are their role's plus every group of theirs that covers it.
- **The seat model:** editing any workspace site takes a seat. When sites with Site Developers come into a workspace (a move, moving one site in, a transfer accepted into a workspace, bringing sites back), each Site Developer becomes a Workspace Developer at once while a seat is free, else a Site Viewer of their sites. Seats never block a move.
- A Workspace Developer changes every site. To keep someone to some sites, or to give them more or less than a Developer, put them in a custom group with chosen sites.
- No plan has a free trial; every paid plan has the 14-day full refund.
- Enterprise is a workspace with limits set by contract; it follows the contract and is not frozen by the rules below. Say plan names, never ids.
- Payment is always the person's step in the Page Lemon app. An AI never pays.

## Ask the person

Ask in one message, as they apply:

- **Starting out:** the workspace's name (a company or team name), which Company plan, monthly or yearly. If they don't know, ask how many people will work on the sites and how many live sites they have, and use `move_sites` (`recommended_plan`) and https://pagelemon.com/pricing.
- **Moving sites in:** which personal sites, and which of the people who edit them come along. Say what each one becomes (the preview's `editors[].becomes`: `developer` (Workspace Developer), `site_viewer` or `in_workspace`). Anyone not brought along loses access to those sites when they move (say so before they choose).
- **Someone who should see everything but change nothing** (a client, a manager, a reviewer): a custom group with View the site on all sites. Ask for their email and the group's name.
- **Who reads messages:** form replies, bookings and orders are read by the Workspace Owner, the Workspace Admins and groups with View users. Ask who else should read them, and on which sites.
- **Someone who should only read form replies and bookings:** a custom group with View users (and View the site) on the sites they need, without Change the site. Or the Workspace Owner adds their address as a notification inbox so new form replies and bookings reach them by email (https://pagelemon.com/agents/notifications).
- **Who manages people:** only the Workspace Owner and Workspace Admins invite, change roles and groups, and remove people. Ask whether anyone else should be an Admin.
- **A new site for someone in the workspace:** before the first publish, ask "Your own (personal) site, or <workspace name>?" and pass `workspace` on `publish_site` (`"private"`, or the workspace). Without it, `publish_site` publishes nothing whenever the site could be personal or in a workspace: its `agent_message` asks the same question. It publishes without asking only when there is one place left (their own plan is full, or the other workspaces are). A workspace site belongs to the workspace: if they leave or are removed it stays there. A site in the workspace is one every Workspace Developer can change, and it stays with the workspace if they leave.
- **Their personal plan:** after the move, keep it for the sites that stay personal, or end it (see below).
- **Inviting people later:** the email of each person.
- **Leaving:** which sites to take to their personal plan, which Site Developers to keep, what to do with upcoming bookings, and who else owns sites there.

## What the person needs ready

- A card (or another way to pay) for the Company plan, entered in the Page Lemon app by the person themselves. Page Lemon never asks for it in chat.
- The email addresses of the people to bring along, as they sign in to Page Lemon.
- Payments: a workspace's sites sell into the workspace's own Stripe account. Only the Workspace Owner connects it, with **Connect payouts** on the workspace's page in the app (Stripe's own pages take the bank and ID details; never in chat, and you can't press it for them); others in the workspace see the status there. `get_account` with `include: ["billing"]` shows each workspace's `payouts` and fee.
- Payments, moving into a workspace: Page Lemon card checkout then pays into the workspace's own payouts, which the Workspace Owner connects on the workspace page; until then checkout on that site pauses. Stripe payment buttons (Payment Links) stay on and keep paying the Stripe account the links were made in.
- Payments, leaving (sites taken to a personal plan): card checkout pays into the person's own payouts and pauses until they connect them; Stripe payment buttons pause until they save their own Payment Links.
- Either way, orders taken before the move stay with the Stripe account that took them (their refunds come out of it), and a payment link from another service pasted into a page keeps paying the account it was made in.

## Set it up

Start a workspace in the Page Lemon app (**Workspaces**, or **Move my sites to a workspace** under Billing). The AI can prepare it:

- `save_site_settings` with `site` and `workspace: "new"` creates an unpaid workspace for that site (the Site Owner approves; reply has `approve_url`). The person then chooses the Company plan and pays in the app.
- `move_sites` (no arguments) previews a move: the sites and the Site Developers on them, whether the Company plan has room (`fits`, `plans`, `recommended_plan`), the questions that apply and the recommended answers. Without a paid workspace it returns `move_url`: the person pays there.

Move personal sites in (`move_sites`):

1. The person pays for the workspace in the app, which also starts the move.
2. Call `move_sites` again. It returns the move and the questions. Offer two ways: **Take our recommendations** (`mode: "recommended"`: every site, every Site Developer brought along, and the personal plan ended once nothing is left on it) or **Step by step** (`mode: "custom"`: choose `sites` ("all" or names), `people` ("all", "none" or emails), `personal_plan` ("keep" or "end")). Who reads messages is decided by roles and View users, not by the move: leave out `members_read` even if the preview still asks it.
3. `move_sites` with `confirm: true` and those answers. The first such call returns `approval_required` with `approve_url`: the person clicks **Approve**. Then call again with `confirm_token` only for the status.

```json
{"confirm": true, "mode": "custom", "sites": ["brave-otter-4821"], "people": ["sam@example.com"], "personal_plan": "keep"}
```

What a move does: the sites move in and stay online; the person stays each site's Site Owner. Site Developers brought along follow the seat model: a Workspace Developer at once while a seat is free, else a Site Viewer of their sites (the reply's `people`, each with `becomes`); someone not signed up yet gets an email invite instead. A mover who is not the Workspace Owner or an Admin keeps them as Site Viewers. Site Developers left out lose access at once (a notice; an email only in the full email mode; their AI hears on next use). Moved sites leave a workspace only by transfer. Site slots and custom domains are checked before the person pays, and again at the move: it is refused (`429`) naming what is over. Seats never refuse a move; `recommended_plan` is the plan where everyone gets a seat. Leaving the app after paying keeps the move pending: a card on the Sites page, and `move_sites` finds it.

The personal plan ends only on the person's tick (`personal_plan: "end"` or the box in the app). It follows the Terms: a full refund in its first 14 days; later a monthly plan stops at the end of the period paid; a yearly plan gets the unused whole months back. Say what the app shows before they tick.

Move one site into a workspace the person is in: prefer `move_sites` with `workspace` (its id), `confirm: true`, `mode: "custom"` and `sites: [name]`, which handles its Site Developers as above. `save_site_settings` with `workspace` (id or name from `get_account`) also moves it (the person approves; the workspace must be paid and have a free site slot), and its Site Developers follow the seat model too (no choice of who comes along; the approval page and the reply's `people` say what each becomes).

The person can also do it in the app, without you: the site → **Settings** → **General** → **Move into a workspace** (shown to a personal site's Site Owner who is in a paid workspace). It is the same move as `move_sites` for that one site: its Site Developers follow the seat model; the dialog says what each becomes before they confirm; the personal plan is kept. Moved, never copied. If a move to that workspace is already waiting, the app sends them to finish it instead.

Add people to a workspace:

- Only the Workspace Owner and Workspace Admins add people; anyone else gets `403` with `error.needs: "workspace_admin"` (the reply names the Workspace Owner). Every invite takes a seat.
- `invite_teammates` with `role: "developer"` on a workspace site invites each address as a Workspace Developer; `role: "admin"` as a Workspace Admin; `role: "custom"` with `group` (a group's id or name) into that group.
- Someone who should only view: make a group first (`save_group` with `name`, `permissions: ["view_site"]`, `sites: ["all"]` or names), then `invite_teammates` with `role: "custom"` and that `group`. `role: "viewer"` on a workspace site puts them in the group "Viewers" (View the site, every site). Ticks (`permissions`) on a workspace site are refused (`400`, `error.needs: "group"`): use `save_group`.
- `save_group` (Owner or Admin) creates a group (`name`, `permissions` from `view_site`, `edit_site`, `members_view`, `members_edit`, `ai_key`, `scan`, `sites`, `people`), changes one (`group`), or deletes one (`group`, `delete: true`).
- Changing someone's role: `invite_teammates` with their one email and the new `role` (`admin`, `developer`, or `custom` with `group`). In the app: **Workspaces** → **Settings** → **People**.
- Every change by an AI waits for the click on `approve_url`.

## Confirm with the person

- **A move:** before `confirm: true`, say what moves, who comes along and who loses access, who will read messages, and what happens to the personal plan. After their yes, the call returns `approve_url`; the click is the final yes.
- **Leaving:** `leave_workspace` without `confirm` returns `questions`, the sites with their needs, `freeze.at` and `agent_message`. Sites taken to the personal plan are moved, not copied; the workspace freezes 14 days after the plan ends, and its other sites are paused and kept 6 months. Ask them in plain words, then call with `confirm: true` and the answers; the person clicks **Approve**.
- **Inviting:** read back the email addresses, the role or group, and say that each one takes a seat.
- **Groups:** read back the group's name, its permissions and its sites before `save_group`.

## Test

- After a move: `get_account` lists the workspace and the sites in it; `get_teammates` on a moved site shows `workspace.people`, and `seats_used` and `seats_limit` for the Workspace Owner. Tell the person which sites moved, which were skipped (`skipped`, with the reason) and who still has to accept an invite. Don't say an invited person has joined until `get_teammates` shows them.
- After leaving: the reply lists `moved`, `offered` and `skipped` sites and the freeze date. The moved sites stay online, with their address, domains, versions and data.
- No test send exists for either; the check is these reads.

## Day to day

- `get_teammates` (seats, who has access: `workspace.people`, each with `role` and `role_name`; for the Workspace Owner and Admins also `workspace.groups`), `get_activity_log` with `workspace` (https://pagelemon.com/agents/activity).
- People in the workspace are removed by the Workspace Owner or an Admin in the app: **Workspaces** → **Settings** → **People** → **Remove**. A removed person loses every workspace site at once, and the sites they made pass to the Workspace Owner; `remove_teammates` with their email says so and gives the link.
- Who reads form replies, bookings and orders follows View users: the Workspace Owner, Admins and groups with it. Notification emails for workspace sites go to the Workspace Owner; others get them only as added inboxes (https://pagelemon.com/agents/notifications).
- Handing the workspace to someone else (**Make Workspace Owner**, they accept) ends the 14-day full refund of its plan, as the app says. Anyone but the Workspace Owner can leave the workspace; they lose access to every workspace site at once.

### Leaving the Company plan, the freeze and reactivating

Only the Workspace Owner. Cancelling the plan itself is done in the app (Billing); the AI prepares what happens to the sites first.

1. `leave_workspace` with `workspace` (id): returns the questions. Then `confirm: true` with `take` (site names to move to the person's personal plan), `offer` (sites other people own: offered to their Site Owners), `keep_editors` ("all", "none" or emails: they stay Site Developers on the personal plan, design only), `bookings` ("keep": customers keep their manage links, the default, or "cancel": cancel upcoming bookings on the sites that stay and email the customers).
2. Moved, not copied: each moved site keeps its address, custom domains, versions and data, and stays online. The personal plan's limits are checked first; with no room it is refused naming the plan that has. The person becomes responsible for the form replies, bookings and orders that move with a site.
3. Timing: the plan runs to the end of the period paid for, then 14 days of grace in which everything works as before, then the workspace freezes. After the 14-day full refund there is no grace: it freezes at once. Frozen: every site in it answers "This site is paused" (`503`), nothing new is taken, and the Workspace Owner can still sign in, see everything and download it all, and export form replies, bookings and orders; everyone else in the workspace can look but change nothing. Each freeze keeps the workspace 6 months from that freeze, then it is deleted; emails go at the freeze, 30 and 7 days before the deletion, and at the deletion. The Workspace Owner can delete it sooner in the app (**I don't need it anymore**, typing its name). Nobody is charged while it is frozen.
4. Reactivate: paying for the Company plan again brings everything back online at once. Then `bring_back_sites` with `workspace` lists the sites that moved out at the freeze; `confirm: true` with `sites` (to bring back) and `decline` (to keep personal) returns an `approve_url`. Sites owned by someone else are offered to their owner. Their Site Developers get a Workspace Developer invite while seats are free (`not_invited` names the rest).

## What Page Lemon refuses, and the fix

| Refused | Fix to offer |
|---|---|
| An invite that needs more seats, or a move that needs more sites or domains, than the plan has (`429`) | Choose fewer, or the bigger plan the reply names |
| Adding people or changing groups by someone not the Workspace Owner or an Admin (`403`, `needs: "workspace_admin"`) | Ask the Workspace Owner the reply names, or an Admin |
| A change the person's role or groups don't allow (`403`, `error.permission`) | An Admin adds them to a group with that permission |
| Ticks (`permissions`) on a workspace site (`400`, `needs: "group"`) | `save_group` with those permissions, then `invite_teammates` with `role: "custom"` |
| Manage the AI key without View users (`400`, `permissions_ai_key_needs_view`) | Add View users to the group too |
| Moving before the workspace is paid | The person pays in the app (`move_url`) |
| A site with a transfer waiting, or archived with no room | Cancel the transfer, or leave that site out |
| An invite for someone already in the workspace (`409`) | Change their role or groups instead |
| A Site Developer invited to a workspace site | They become a Workspace Developer instead (one seat) |
| Making a workspace site private | The Site Owner transfers it to themselves (https://pagelemon.com/agents/transfer) |
| `leave_workspace` by anyone but the Workspace Owner, or with an API token limited to one site | The Workspace Owner, in the app or with a full-access token |
| Leaving with more live sites than the personal plan holds | Choose fewer, archive a site, or a bigger personal plan |
| Changes on a frozen workspace (`403`, `frozen: "workspace"`) | Reactivate it, or download and leave |
| An Enterprise workspace | Follows its contract: support@pagelemon.com |

## Links

- For the person: https://pagelemon.com/docs/workspaces
- Site Developers: https://pagelemon.com/agents/co-editing · Hand a site over: https://pagelemon.com/agents/transfer · Activity log: https://pagelemon.com/agents/activity · Notifications: https://pagelemon.com/agents/notifications
- Plans and billing: https://pagelemon.com/docs/billing · Leaving Page Lemon: https://pagelemon.com/docs/leaving
- API: https://pagelemon.com/docs/api · MCP tools: https://pagelemon.com/docs/mcp
- All AI guides: https://pagelemon.com/agents
