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

# Organizations

> The top-level isolation boundary in Repo.

An **organization** (sometimes called a "workspace" in the console UI) is the unit of isolation for everything Repo stores: connectors, source items, embeddings, API keys, audit events, billing subscriptions.

## What's scoped per organization

* All connectors (Slack workspace, Notion integration, Drive account, Gmail mailbox)
* All ingested source items + their embeddings
* All API keys
* All sync run history
* All audit events
* The billing subscription + usage credits

Two organizations on the same Repo deployment never see each other's data. The org\_id is enforced at the database level on every query.

## Membership

Each organization has one or more **memberships** — a user + role pair. Today every membership is created with role `admin`. When team invites ship, roles `member` and `viewer` will gain meaning; `admin` will be required for destructive operations (key creation, billing changes, source connection).

A single Supabase user (one email) can belong to multiple organizations and switch between them in the console. API keys are tied to a single organization — the key carries the `organization_id` in its hash and cannot be moved.

## Creating organizations

Most users create one organization at signup and stop there. The console supports up to `MAX_WORKSPACES_PER_USER` (default 10) per user as a soft abuse cap; contact support if you legitimately need more.

```bash theme={null}
# Console-side, requires a Supabase bearer token
POST /v1/console/workspaces
{
  "organizationName": "Acme Inc"
}
```

The response includes the new organization ID, slug, and a freshly seeded membership record placing you as admin.

## Internal / grandfathered organizations

Repo's billing tier `internal` exists for founder + demo workspaces — unlimited usage, never charged. You won't see this tier as a customer. It's documented here because it shows up in API responses for grandfathered accounts.
