BuildBaseBuildBase

Managing Members

Invite members, assign roles, and track seat usage.

Use the built-in members screen to manage workspace membership. One call handles invites, roles, seat tracking, and permissions automatically.

import { useSaaSAuth } from '@buildbase/sdk/react';

function TeamButton() {
  const { openWorkspaceSettings } = useSaaSAuth();
  return (
    <button onClick={() => openWorkspaceSettings('users')}>Manage Team</button>
  );
}

The members screen includes:

  • Invite members by email with role selection - the address need not have an account yet, see Invitations
  • Pending invitations under the form, with resend and revoke
  • View all members with their roles
  • Change member roles
  • Remove members
  • Seat usage bar (when seat pricing is enabled)
  • Permission-gated - only users with the right permissions see management controls

Note

With @buildbase/sdk 0.0.71 or later on a server from release 22 , the members screen's invite form sends an invitation to any address, account or not, and lists it as pending until it is answered. Before that it added an existing account at once. addUser is unchanged.

Checking seat availability

Use useSeatStatus() to show seat info in your UI:

import { useSeatStatus } from '@buildbase/sdk/react';

function SeatBadge({ workspace }) {
  const { memberCount, includedSeats, canInvite } = useSeatStatus(workspace);

  return (
    <p>
      {memberCount} of {includedSeats} seats used
      {!canInvite && ' — seat limit reached'}
    </p>
  );
}
ReturnTypeDescription
memberCountnumberCurrent members. Pending invitations also hold seats; the members screen counts them
includedSeatsnumberSeats in the plan
availableSeatsnumberRemaining seats (Infinity if unlimited)
canInvitebooleanWhether invites are allowed
inviteBlockReason'seat_limit_reached' | 'settings_user_limit_reached' | 'no_subscription' | nullMachine-readable code for why invites are blocked, or null if allowed
inviteBlockMessageKeystring | nulli18n key for the human-readable block message - resolve with t(key, inviteBlockMessageValues)

Programmatic access

If you need to manage members from code (e.g., onboarding flows), use useSaaSWorkspaces():

import { useSaaSWorkspaces } from '@buildbase/sdk/react';

const { addUser, inviteMember, removeUser, updateUser } = useSaaSWorkspaces();

// Invite during onboarding: the address need not have an account yet
await inviteMember(workspaceId, '[email protected]', 'editor');

// Add an account that already exists, at once (404 when it does not)
await addUser(workspaceId, '[email protected]', 'editor');

Required permissions

ActionPermission
Invite a memberWORKSPACE_MEMBERS_INVITE
Remove a memberWORKSPACE_MEMBERS_REMOVE
Change a roleWORKSPACE_MEMBERS_ROLE_CHANGE

Next Steps