Skip to main content
Set a group’s visibility to public or private. Public groups appear on your public profile along with their bookmarks (subject to individual bookmark visibility settings).

Endpoint

group.setVisibility
Source: server/procedures/bookmarks.ts:196

Input

id
string
required
The ID of the group to update
isPublic
boolean
required
Visibility setting:
  • true - Make group public (visible on profile)
  • false - Make group private (hidden from profile)

Response

id
string
The group ID
name
string
The group name
color
string
The group’s color (hex format)
isPublic
boolean
The updated visibility setting
userId
string
The owner’s user ID
createdAt
string
ISO 8601 timestamp of creation
updatedAt
string
ISO 8601 timestamp of last update

Visibility behavior

When a group is set to public:
  1. The group appears on your public profile (if profile is public)
  2. Bookmarks within the group are visible if:
    • Bookmark isPublic is explicitly true, OR
    • Bookmark isPublic is null (inherits from group)
  3. Bookmarks with explicit isPublic: false remain private
When a group is set to private:
  1. The group is completely hidden from your public profile
  2. All bookmarks in the group are hidden, regardless of individual settings
  3. Only you can see the group and its bookmarks when logged in

Usage examples

React Query (client component)

'use client';

import { client } from '@/lib/orpc';

function GroupVisibilityToggle({ groupId }: { groupId: string }) {
  const { mutate, isPending } = client.group.setVisibility.useMutation();
  
  const handleTogglePublic = (isPublic: boolean) => {
    mutate({
      id: groupId,
      isPublic,
    });
  };
  
  return (
    <div>
      <button onClick={() => handleTogglePublic(true)} disabled={isPending}>
        Make public
      </button>
      <button onClick={() => handleTogglePublic(false)} disabled={isPending}>
        Make private
      </button>
    </div>
  );
}

Server component

import { serverClient } from '@/lib/orpc.server';

async function shareGroupPublicly(groupId: string) {
  const group = await serverClient.group.setVisibility({
    id: groupId,
    isPublic: true,
  });
  
  console.log(`Group "${group.name}" is now public`);
  return group;
}

Direct client

import { client } from '@/lib/orpc';

// Make group public
const group = await client.group.setVisibility.mutate({
  id: 'group_id',
  isPublic: true,
});

// Later, make it private again
await client.group.setVisibility.mutate({
  id: group.id,
  isPublic: false,
});

Workflow: Publishing a curated collection

import { client } from '@/lib/orpc';

async function publishCollection(groupId: string) {
  // Step 1: Get all bookmarks in the group
  const bookmarks = await client.bookmark.list.query({ groupId });
  
  // Step 2: Make all bookmarks public (or null to inherit)
  await client.bookmark.bulkSetVisibility.mutate({
    ids: bookmarks.map(b => b.id),
    isPublic: null, // Will inherit from group
  });
  
  // Step 3: Make the group public
  await client.group.setVisibility.mutate({
    id: groupId,
    isPublic: true,
  });
  
  console.log('Collection published!');
}

Prerequisites

Before making a group public, ensure:
  1. Your user profile is set to public (isProfilePublic: true)
  2. You have a username configured
  3. The group contains bookmarks you want to share
Making a group public will expose all bookmarks in that group that have isPublic: true or isPublic: null. Review bookmark visibility before publishing.