Members & Invitations

Invite members, manage memberships, and assign roles.

Overview

Members are the people with access to your account, and they exist at two levels:

  • Organization members belong to your entire organization. Invited users become organization members and can receive an organization-level role.
  • Project members belong to a single project. Add organization members to projects to grant project access with a project-level role.

A user must be an organization member before they can be added to a project. New members join by accepting an invitation, and project membership grants access to specific projects.

All methods on this page require an Organization API Key. See the Quickstart to create a client.

Members

You can manage the people in your organization and its individual projects.

List Members

You can list members page by page; the listing defaults to page=1 and page_size=25.

1from confidentai import ConfidentAI
2
3client = ConfidentAI()
4
5org = client.organization()
6project = client.project("clq9z3x1k0001la08f7t3g5p2")
7
8# Organization members
9members = org.members.list(page=1, page_size=25)
10
11# Project members
12project_members = project.members.list(page=1)

Update a Member’s Role

You can assign a role to a member by their user_id. Roles are managed in the Roles, Policies & Permissions section.

1org = client.organization()
2project = client.project("clq9z3x1k0001la08f7t3g5p2")
3
4# Organization-level role
5member = org.members.update_role("clq8n3p9k0002la09a1b7c4d2", role_id="b3f1c2a9-7d4e-4c1b-9a2f-1e6d8c0a4b7e")
6
7# Project-level role
8project_member = project.members.update_role("clq8n3p9k0002la09a1b7c4d2", role_id="b3f1c2a9-7d4e-4c1b-9a2f-1e6d8c0a4b7e")

Remove a Member

You can remove a member from your organization or a specific project by their user_id.

1org = client.organization()
2project = client.project("clq9z3x1k0001la08f7t3g5p2")
3
4org.members.remove("clq8n3p9k0002la09a1b7c4d2")
5project.members.remove("clq8n3p9k0002la09a1b7c4d2")

Invitations

You can invite new people to your organization or projects, and manage invitations that are still pending.

List Invitations

You can list the pending invitations at the organization or project level.

1org = client.organization()
2project = client.project("clq9z3x1k0001la08f7t3g5p2")
3
4invitations = org.invitations.list()
5project_invitations = project.invitations.list()

Create Invitations

You can invite one or more emails at once, and the optional role_id assigns a role to invitees when they join.

1org = client.organization()
2project = client.project("clq9z3x1k0001la08f7t3g5p2")
3
4# Organization invitations
5invitations = org.invitations.create(
6 ["alice@example.com", "bob@example.com"],
7 role_id="b3f1c2a9-7d4e-4c1b-9a2f-1e6d8c0a4b7e",
8)
9
10# Project invitations
11project_invitations = project.invitations.create(
12 ["alice@example.com"],
13 role_id="b3f1c2a9-7d4e-4c1b-9a2f-1e6d8c0a4b7e",
14)

Resend & Revoke Invitations

You can resend a pending invitation by its invitation_id, or revoke it to cancel access before it’s accepted.

1org = client.organization()
2project = client.project("clq9z3x1k0001la08f7t3g5p2")
3
4# Resend
5org.invitations.resend(42)
6project.invitations.resend(42)
7
8# Revoke
9org.invitations.revoke(42)
10project.invitations.revoke(42)

Next Steps

Define roles before assigning access to members: