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

# Private chats vs organization chats

> Control who can see a chat in ModuleX. Keep a conversation private to yourself, or make it visible to everyone in your organization — and understand how the active organization scopes what you see.

export const MediaEmbed = ({id, type = 'screenshot', caption = '', ext, ratio = '16 / 9'}) => {
  const isVideo = type === 'video' || type === 'app_video';
  const resolvedExt = ext || (isVideo ? 'mp4' : type === 'screenshot' ? 'webp' : 'svg');
  const src = 'https://media.modulex.dev/' + id + '.' + resolvedExt;
  const [status, setStatus] = useState('loading');
  const [isDev, setIsDev] = useState(false);
  const [inView, setInView] = useState(false);
  const boxRef = useRef(null);
  useEffect(() => {
    if (typeof window === 'undefined') return;
    const h = window.location.hostname;
    setIsDev(h === 'localhost' || h === '127.0.0.1' || h.endsWith('.mintlify.app'));
  }, []);
  useEffect(() => {
    if (inView) return;
    if (typeof IntersectionObserver === 'undefined') {
      setInView(true);
      return;
    }
    const el = boxRef.current;
    if (!el) return;
    const io = new IntersectionObserver(entries => {
      if (entries.some(e => e.isIntersecting)) {
        setInView(true);
        io.disconnect();
      }
    }, {
      rootMargin: '300px'
    });
    io.observe(el);
    return () => io.disconnect();
  }, [inView]);
  if (status === 'missing') {
    if (!isDev) return null;
    return <div style={{
      display: 'flex',
      flexDirection: 'column',
      justifyContent: 'center',
      gap: '0.4rem',
      padding: '1rem 1.25rem',
      margin: '1.25rem 0',
      width: '100%',
      aspectRatio: ratio,
      boxSizing: 'border-box',
      border: '1px dashed rgba(128,128,128,0.45)',
      borderRadius: '0.75rem',
      background: 'rgba(128,128,128,0.06)',
      color: 'currentColor',
      fontSize: '0.85rem',
      lineHeight: 1.45
    }}>
        <div style={{
      display: 'flex',
      alignItems: 'center',
      gap: '0.5rem',
      opacity: 0.75
    }}>
          <span aria-hidden="true">🎬</span>
          <code style={{
      fontSize: '0.75rem'
    }}>{id}</code>
          <span style={{
      fontSize: '0.65rem',
      textTransform: 'uppercase',
      letterSpacing: '0.04em',
      padding: '0.1rem 0.4rem',
      borderRadius: '0.4rem',
      background: 'rgba(128,128,128,0.18)'
    }}>
            {type}
          </span>
        </div>
        <div style={{
      opacity: 0.9
    }}>{caption || 'Media not uploaded yet.'}</div>
        <div style={{
      fontSize: '0.7rem',
      opacity: 0.5
    }}>
          Upload to R2 as <code>{id}.{resolvedExt}</code> — preview only, hidden in production.
        </div>
      </div>;
  }
  const mediaStyle = {
    display: status === 'loaded' ? 'block' : 'none',
    width: '100%',
    height: 'auto',
    borderRadius: '0.75rem'
  };
  const media = isVideo ? <video src={inView ? src : undefined} autoPlay loop muted playsInline preload="metadata" onLoadedData={() => setStatus('loaded')} onError={() => setStatus('missing')} style={mediaStyle} /> : <img src={inView ? src : undefined} alt={caption} onLoad={() => setStatus('loaded')} onError={() => setStatus('missing')} style={mediaStyle} />;
  return <figure style={{
    margin: '1.25rem 0'
  }}>
      <div ref={boxRef} style={status === 'loaded' ? {
    width: '100%'
  } : {
    width: '100%',
    aspectRatio: ratio,
    borderRadius: '0.75rem',
    background: 'rgba(128,128,128,0.06)'
  }}>
        {media}
      </div>
      {status === 'loaded' && caption ? <figcaption style={{
    marginTop: '0.5rem',
    textAlign: 'center',
    fontSize: '0.85rem',
    opacity: 0.7
  }}>
          {caption}
        </figcaption> : null}
    </figure>;
};

Every chat in ModuleX has one switch that decides who can read it: it is either **private to you** or **visible to your whole organization**. New chats are organization-visible by default, so your team can find and pick up each other's work. When a conversation should stay personal, you flip it to private and only you can open it.

This page explains the two visibility settings, who can see what, and how your active organization scopes the chats you see in the first place. For how chats are stored and what a chat is, start with [chat overview](/platform/chat/overview). For the tenancy model behind all of this, see [organizations, roles and membership](/concepts/organizations-roles).

<MediaEmbed id="MX-MEDIA-3360" type="screenshot" caption={"The chat settings menu showing the private / organization visibility toggle on an open chat."} />

## The two kinds of chat

A chat is one of two things at any moment. You can change which one it is at any time if you created it.

<CardGroup cols={2}>
  <Card title="Private chat" icon="lock">
    Only you — the person who created the chat — can open it. No one else in your organization sees it in their history, even other owners and admins.
  </Card>

  <Card title="Organization chat" icon="users">
    Everyone in the same organization can open it. This is the default for a new chat, so teammates can find shared work without you sending a link.
  </Card>
</CardGroup>

Visibility is a single setting on the chat (`is_private`). Organization-visible chats have it off; private chats have it on. There is no third "share with specific people" state — a chat is either yours alone or open to the whole organization.

<Note>
  New chats are **organization-visible by default**. If you want a conversation kept to yourself, set it to private — ideally before you start, or as soon as you realize it should be personal.
</Note>

## Who can see what

Visibility and your role both play a part. The table below is the full picture for chats that belong to your active organization.

| You are…               | Private chat you created | Private chat a teammate created | Organization chat (anyone's) |
| ---------------------- | ------------------------ | ------------------------------- | ---------------------------- |
| The creator            | You see it               | —                               | You see it                   |
| Another owner or admin | You do **not** see it    | You do **not** see it           | You see it                   |

The rule is short: a private chat is visible only to the person who created it. An organization chat is visible to every member of that organization. Being an owner or admin does **not** let you read someone else's private chat — privacy is per-creator, not per-role.

<Warning>
  A private chat is hidden, not encrypted end to end against your organization. It is excluded from other members' lists and they cannot open it through the app, but it still lives inside your organization's data. Treat private as "personal workspace", not "secret". For how data is protected and encrypted at rest, see [data security and encryption](/security/data-encryption).
</Warning>

### What happens when you switch a chat

Changing visibility takes effect immediately and changes who the chat appears for.

<CardGroup cols={2}>
  <Card title="Private → organization" icon="lock-open">
    The chat becomes visible to everyone in the organization. Your teammates will now see it in their history, including the messages already in it.
  </Card>

  <Card title="Organization → private" icon="lock">
    The chat disappears from everyone else's history and only you can open it from then on.
  </Card>
</CardGroup>

## Who can change visibility

Only the person who created a chat can change whether it is private or organization-visible. A teammate — even an owner or admin — cannot make your chat private or public on your behalf.

<Note>
  If you are not the creator and you try to change a chat's visibility, ModuleX treats the chat as not available to you rather than telling you it is a permission problem. You will see a "not found or no access" result, not an explicit "you are not allowed" message.
</Note>

This matters for two related actions:

* **Renaming a private chat** can also only be done by its creator. Renaming an organization chat is open to any member.
* **Deleting a private chat** can only be done by its creator. Deleting an organization chat can be done by any member of the organization, so a shared chat can be cleaned up by the team.

For who counts as an owner or admin and what else those roles gate, see [roles and permissions](/security/roles-permissions).

## Organizations scope every chat

Before privacy even comes into play, your **active organization** decides which chats you see at all. ModuleX is multi-tenant: you can belong to more than one organization, and a chat always belongs to exactly one of them.

<Steps>
  <Step title="You pick an active organization">
    The organization switcher in the app sets which organization you are working in right now. Everything you do — chats included — happens inside it.
  </Step>

  <Step title="Your chat list is filtered to that organization">
    You see organization chats from the active organization plus your own private chats in it. Chats in your other organizations are not shown until you switch.
  </Step>

  <Step title="Switching organizations swaps the whole view">
    Change the active organization and the chat list reloads for the new one. A chat you created under one organization does not move with you to another.
  </Step>
</Steps>

Under the hood, every request the app makes carries an `X-Organization-ID` header that names the active organization, and the server only returns chats that belong to it. You never mix chats across organizations by accident. For the mechanics of the org context header, see [org context and X-Organization-ID](/security/org-context).

<Note>
  A chat lives in one organization for its whole life. There is no "move this chat to another organization" action. If you need the same conversation in a different organization, start it there.
</Note>

## Folders are personal, even on shared chats

Visibility decides who can open a chat. **Folders** are separate and always personal: how you file a chat into a folder is yours alone and does not change where it appears for anyone else.

That means two people looking at the same organization chat can each keep it in a different folder — one in `work`, another pinned — without affecting each other. The default folder for any chat you have not filed is `chats`. See [history and folders](/platform/chat/history-folders) for organizing your sidebar.

## Setting visibility from the API

In the app you flip visibility from the chat's settings. If you are building on ModuleX, the same setting is the `is_private` field on a chat, updated with a `PATCH` request. The example below sets a chat to private; send `false` to make it organization-visible. You can update the title and your personal folder in the same call.

Every request authenticates with `Authorization: Bearer mx_live_…` plus your `X-Organization-ID` header — see [authentication](/api-reference/authentication). Only the chat's creator can change `is_private` or the title of a private chat; if you are not the creator, the call returns `404`.

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PATCH https://api.modulex.dev/chats/0a1b2c3d-4e5f-6789-abcd-ef0123456789 \
    -H "Authorization: Bearer mx_live_xxxxxxxxxxxxxxxxxxxxxxxx" \
    -H "X-Organization-ID: a1b2c3d4-e5f6-7890-abcd-ef0123456789" \
    -H "Content-Type: application/json" \
    -d '{
      "is_private": true,
      "folder": "personal"
    }'
  ```

  ```python Python theme={null}
  from modulex import Modulex

  client = Modulex(
      api_key="mx_live_xxxxxxxxxxxxxxxxxxxxxxxx",
      organization_id="a1b2c3d4-e5f6-7890-abcd-ef0123456789",
  )

  # Make a chat private and file it into your personal folder.
  chat = await client.chats.update(
      "0a1b2c3d-4e5f-6789-abcd-ef0123456789",
      is_private=True,
      folder="personal",
  )
  ```

  ```javascript JavaScript theme={null}
  import { Modulex } from "modulex-js";

  const client = new Modulex({
    apiKey: "mx_live_xxxxxxxxxxxxxxxxxxxxxxxx",
    organizationId: "a1b2c3d4-e5f6-7890-abcd-ef0123456789",
  });

  // Make a chat private and file it into your personal folder.
  const chat = await client.chats.update(
    "0a1b2c3d-4e5f-6789-abcd-ef0123456789",
    { isPrivate: true, folder: "personal" },
  );
  ```
</CodeGroup>

<Note>
  Chats are created by running the Assistant or a workflow, not by a manual "create chat" call — and there is no endpoint for posting a message into an existing chat thread. `PATCH /chats/{chat_id}` changes a chat's title, visibility, and your folder; it does not add messages. To start a conversation, begin an [Assistant](/concepts/assistant) turn or [run a workflow from chat](/platform/chat/workflow-run). See [known limitations](/reference/known-limitations) for the read-only nature of chat threads.
</Note>

## Common questions

<AccordionGroup>
  <Accordion title="Are new chats private or shared by default?">
    Shared. A new chat is organization-visible unless you set it to private. Switch it to private from the chat's settings (or send `is_private` as true) whenever you want it kept to yourself.
  </Accordion>

  <Accordion title="Can an owner or admin read my private chats?">
    No. A private chat is visible only to the person who created it. Owner and admin roles control what you can do across the organization, but they do not grant access to another member's private chats.
  </Accordion>

  <Accordion title="Who can rename or delete a shared chat?">
    Any member of the organization can rename or delete an organization chat. A private chat can only be renamed or deleted by its creator.
  </Accordion>

  <Accordion title="If I share a private chat, do older messages become visible too?">
    Yes. Switching a chat from private to organization-visible exposes the whole conversation, including messages that were sent while it was private.
  </Accordion>

  <Accordion title="Why don't I see a chat a teammate told me about?">
    Either it is private to them, or it is in a different organization than the one you have active. Check your organization switcher first, then confirm the chat is organization-visible. See [chat collaboration](/platform/collaboration/chat) for working in shared chats.
  </Accordion>

  <Accordion title="Does putting a chat in a folder change who can see it?">
    No. Folders are personal to you and never affect visibility. Use the private / organization setting to control access, and folders only to organize your own sidebar.
  </Accordion>
</AccordionGroup>

## Where to go next

<CardGroup cols={2}>
  <Card title="Chat collaboration" icon="users" href="/platform/collaboration/chat">
    How teams work in shared, organization-visible chats together.
  </Card>

  <Card title="Organizations, roles and membership" icon="building" href="/concepts/organizations-roles">
    The tenancy model: organizations, the active-organization context, and the owner and admin roles.
  </Card>

  <Card title="Org context and X-Organization-ID" icon="key" href="/security/org-context">
    How the organization header scopes every request you make, including which chats you see.
  </Card>

  <Card title="History and folders" icon="folder-tree" href="/platform/chat/history-folders">
    Find past conversations and group them into personal folders.
  </Card>
</CardGroup>
