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

# Managing client workspaces

> Create, switch between, request access to, and detach client workspaces from your agency.

The **agency dashboard** at [/admin/agency](https://chartcastr.com/admin/agency) is the control surface for every client workspace under your agency parent. Anything beyond data ingestion (sources, connections, pulses) lives inside the child workspace itself — switch in to manage it.

## Creating a client

Click **Create client** on the agency dashboard. You'll be asked for:

* **Client name** — shown in the sidebar switcher and on every chart delivery.
* **Slug** (optional) — URL identifier. Lowercase letters, numbers, dashes only. Auto-generated from the name if omitted.

The new workspace appears immediately in the sidebar's **Agency** group. You're auto-added as **admin** of the new workspace.

## Switching between workspaces

Two ways:

1. **Sidebar Agency group** — quick-switch entries for every workspace you're a member of. One click to jump in.
2. **Org switcher in the sidebar footer** — Clerk's full org switcher (every workspace you belong to, including ones outside the agency).

Switching clears all cached data and reloads scoped to the new workspace — there's no risk of leaking data across clients.

## Requesting access to a workspace

By default, only the **agency admin who created** a workspace is added to it. Other agency admins must self-invite from the agency dashboard:

1. On [/admin/agency](https://chartcastr.com/admin/agency), find the workspace.
2. Click **Get access** (visible only if you're not already a member).
3. You're added as an admin via Clerk. The workspace now shows up in your sidebar.

This explicit access model gives you a clean audit trail of which agency members have touched which client.

<Note>
  If you'd prefer auto-mirroring (every agency admin in every client workspace), [contact support](mailto:hi@chartcastr.com) — we can flip a flag per-account.
</Note>

## Inviting a client to their workspace

Inside the child workspace, open **Settings → Organization → Members** and use Clerk's invite flow. The client sees only their own workspace, with no view of your agency or other clients.

## Detaching a client

If a client wants to take their reporting in-house, you can detach the workspace:

1. On [/admin/agency](https://chartcastr.com/admin/agency), find the workspace.
2. Click the unlink icon, then **Detach** in the confirm dialog.

What happens:

* The workspace becomes a **standalone** Chartcastr org on the **free tier**.
* All members (including your agency admins) keep their access.
* The workspace can upgrade independently to Starter/Pro from there.
* It no longer counts against your agency child-workspace cap.

You can re-attach a detached workspace by contacting support — automated re-attach is on the roadmap.

## Deleting a workspace

Open the workspace itself, then **Settings → Organization → General → Delete**. Standard Clerk flow.

<Warning>
  You **cannot delete the parent agency org** while it has any child workspaces. Detach or delete all clients first.
</Warning>

## Cross-client data isolation

Every database query, GraphQL resolver, and storage path is scoped to the active workspace's organization id. There is no "see everything across clients" view by design — for cross-client analytics, run a pulse in your **parent agency** workspace against your own metrics.
