HelloJohn / docs
Organizations

Personal Organizations

Automatically create a personal organization for every new user in HelloJohn.

Personal Organizations

A personal organization is a private organization created automatically for each user when they sign up. It acts as their default workspace — useful for apps where every user starts with their own space before optionally joining or creating team organizations.

What Is a Personal Organization?

A personal organization is just like any other organization, with one key difference: it is created automatically by HelloJohn at sign-up and is permanently tied to its creator. The user is the sole owner and the organization cannot be deleted (unless the user account is deleted).

{
  "id": "org_01HABCDEF111000",
  "name": "Alice Smith's Workspace",
  "slug": "alice-smith",
  "is_personal": true,
  "member_count": 1,
  "created_at": "2024-01-15T10:00:00Z"
}

The is_personal: true flag distinguishes it from team organizations.


Enabling Personal Organizations

Enable in Tenant Settings → Organizations → Auto-create personal organization.

Or via the Admin API:

curl -X PATCH "https://api.hellojohn.dev/v1/admin/config" \
  -H "Authorization: Bearer sk_live_abc123" \
  -H "X-Tenant-ID: tnt_01HABCDEF654321" \
  -H "Content-Type: application/json" \
  -d '{"personal_organization_enabled": true}'

When enabled, HelloJohn creates a personal organization for every new user. The organization name defaults to {user.name}'s Workspace.


Common Use Cases

Individual + Team Workspaces

Apps like Figma, Notion, and Linear give each user a personal workspace by default. Users can then create or join team workspaces later.

// On sign-in, identify which org to activate
const orgs = await hj.user.getOrganizations();

// Personal org is always first in the list
const defaultOrg = orgs.find((o) => o.is_personal) ?? orgs[0];
await hj.setActiveOrganization(defaultOrg.id);

Freemium Model

Users get a personal org on sign-up (free tier). When they upgrade, they create a team org with more seats and features.

function OrgSwitcher() {
  const { organizations } = useHelloJohn();

  const personalOrg = organizations.find((o) => o.is_personal);
  const teamOrgs = organizations.filter((o) => !o.is_personal);

  return (
    <div>
      <p>Personal</p>
      <OrgItem org={personalOrg} />
      <p>Teams</p>
      {teamOrgs.map((org) => <OrgItem key={org.id} org={org} />)}
    </div>
  );
}

Restricting Personal Org Membership

By default, personal organizations only contain the owner. You can prevent members from being invited to personal organizations:

curl -X PATCH "https://api.hellojohn.dev/v1/admin/config" \
  -H "Authorization: Bearer sk_live_abc123" \
  -H "X-Tenant-ID: tnt_01HABCDEF654321" \
  -H "Content-Type: application/json" \
  -d '{"personal_organization_invitations_enabled": false}'

When set to false, attempts to invite members to a personal org return a 403 error.


Identifying Personal Organizations

Use the is_personal field to distinguish personal orgs in your UI:

import { useOrganization } from "@hellojohn/react";

function OrgHeader() {
  const { organization } = useOrganization();

  return (
    <header>
      <h1>{organization.name}</h1>
      {organization.is_personal && (
        <span className="badge">Personal</span>
      )}
    </header>
  );
}

Naming Personal Organizations

By default, the personal org name is generated from the user's name: {name}'s Workspace. You can customize this format in Tenant Settings.

Users can rename their personal organization just like any other org:

const { organization, update } = useOrganization();

await update({ name: "My Projects" });

On this page