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

# Account Ownership

> How data is attributed to team organisations vs a person's Personal organisation, how accounts and guests get a Personal organisation, and how erasure works for each.

## Overview

Every piece of content belongs to a workspace, and every workspace belongs to an organisation. The organisation's `kind` decides who controls the data:

| Organisation | Who belongs | GDPR role | Decides erasure requests |
| - | - | - | - |
| **Team** (`kind = 'team'`) | Its members (`user_organisations`) | Organisation = controller, Kair = processor | The organisation's admins (or a platform admin) |
| **Personal** (`kind = 'personal'`) | Exactly one account, its owner | Kair = controller | A platform admin |

One `users` row can hold both: memberships of any number of team organisations, and one Personal organisation with any number of private workspaces (bundles). See [User lifecycle](https://docs.kair.is/flows/user-lifecycle.md) for the sequence diagrams.

***

## Identity model

| Field | Meaning |
| - | - |
| `users.organisation_id` | Current organisation (the switcher): a team or the user's Personal. `NULL` only for guests and accounts that haven't logged in yet. |
| `users.role` | Platform role (`participant`, `moderator`, `admin`, `org_admin`). `org_admin` is a navigation hint; org-admin actions check `user_organisations.role` for the organisation in the request. |
| `user_organisations.role` | Role in one organisation (`member`, `org_admin`). The owner is a `member` of their Personal organisation. |
| `organisations.kind` | `team` or `personal` (Postgres enum `organisation_kind`). |
| `users.is_guest` | Guest token scoped to one workspace; never has a Personal organisation. |
| `users.onboarded_at` | Set at first login (or when a guest completes onboarding). |
| `users.frozen_at` | Set while an erasure request is pending; blocks sign-in. |

Workspace lists show only workspaces whose `organisation_id` is the current organisation.

***

## Getting a Personal organisation

| Account | When |
| - | - |
| Invited (organisation invite or waitlist approval) | At the first magic-link login, together with a private home workspace that holds integrations (calendar, devices, meeting bot) |
| Guest who completes onboarding (`POST /auth/complete-guest-onboarding`) | At the magic-link login that follows; their guest workspace memberships stay |
| Existing before personal organisations | Migration `m20261110_000001_personal_organisations`; workspaces without an organisation, or in the old shared `default` one, that only they use moved into it (shared ones went to the team most of their users share) |
| Skipped by the migration (deletion was pending) | At their next magic-link login; workspaces without an organisation that only they use move in, and their existing home stays their home |

Inviting an account that already exists only adds the team membership. Nobody can be added to someone else's Personal organisation, and its workspaces can't be shared.

***

## What belongs where

| Entity | Belongs to |
| - | - |
| Sessions, transcripts, summaries, topics & topic graph nodes | Their workspace's organisation |
| Recall bot sessions | Their workspace's organisation |
| Workspaces created by the user | The organisation that was current when they were created |
| API keys with `organisation_id` | That organisation |
| Devices, calendar accounts | The account (paired or connected by the person) |
| Summary prompt override | The team organisation; all Personal organisations share one |

Content never changes organisation on its own. `session.workspace_id` is fixed when a session starts, and switching organisation moves nothing. Moving a session from Personal into a team workspace is an explicit step ([#208](https://github.com/meldtech/kair-voice/issues/208)), not built yet.

***

## Erasure

Every request is made with `POST /me/data-requests { organisation_id }` and is stored with `scope = 'organisation'`, the Personal organisation included. See [Data subject requests](https://docs.kair.is/platform/data-subject-requests) for what each step erases.

| Request in | Erases | Decided by |
| - | - | - |
| A team organisation | The person's content in that organisation's workspaces, plus workspaces without an organisation that they own or belong to. When it is their last team, their Personal workspaces too | Its org admins, or a platform admin |
| Their Personal organisation | The person's content in their personal workspaces; those workspaces are deleted outright, shared or not | A platform admin |

Personal doesn't count as a membership here. Account-level records (credentials, devices, the pseudonymised `users` row) and the Personal membership go with the request that leaves the person in no team, so someone in one team deletes everything with one request. A person in no team asks in their Personal organisation.

While a request is pending the whole account is frozen (`users.frozen_at`): OAuth tokens are revoked, API keys deactivated and calendar auto-join paused. Rejecting or cancelling lifts the freeze and restores the keys and auto-join; the person signs in again.

***

## Controller and processor

| Context | GDPR role | Erasure reviewer |
| - | - | - |
| Team organisation data | Organisation = controller; Kair = processor | Org admin |
| Personal organisation data | Kair = controller | Platform admin |

The privacy policy and trust page must:

* distinguish the two processing bases;
* for team data, describe Kair's obligations as processor under the organisation's DPA;
* for Personal data, state Kair's lawful basis (contract performance / legitimate interest), retention periods and the right to erasure;
* list Kair as processor for team accounts and as controller for Personal.

***

## Not built yet

* **Moving sessions out of Personal** into a team workspace, with the reminder of who will gain access ([#208](https://github.com/meldtech/kair-voice/issues/208)).
* **Notifying platform admins** of a request in a Personal organisation: new-request emails go to the organisation's admins, and a Personal organisation has none.
* **A freeze scoped to one membership.** `user_organisations.frozen_for_request_id` exists, but a pending request freezes the whole account, so the person can't keep using Personal or other organisations meanwhile.
* **Requests with `scope = 'personal'`**: the enum value exists; the worker refuses it, and Personal data goes through a request in the Personal organisation instead.


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