Nirmos
Platform setup

Organizations and members

Administer an existing organization using an authorized personal key.

Create an organization in the Dashboard. For SDK administration, use a personal API key bound to that organization with the required grants. Service keys do not supply the membership identity these operations require.

Read organization membership

const context = await nirmos.auth.getContext();
if (context.keyType !== "user" || !context.organizationId) {
  throw new Error("Organization administration requires a bound personal key");
}
const organization = await nirmos.organizations.get(context.organizationId);
const members = await nirmos.organizations.members.list(context.organizationId, { limit: 25 });
console.log(organization.name, members.items.length);

Organization reads need organization:read; member listing needs member:read. IDs must match the key's organization. Pagination explains cursor traversal.

Invite or update members

Use organizations.invitations.create with invitation:create and invitations.cancel with invitation:cancel. Existing invitations and member lists require the relevant read grants. Invitation creation does not guarantee email delivery; verify the deployment's delivery configuration.

Role changes need member:update. Custom role management uses ac:read, ac:create, ac:update or ac:delete. Delegated permissions cannot exceed the actor's grants; protected roles and last-owner constraints remain enforced. Access control gives a role example.

Organization metadata updates require organization:update. Organization deletion requires organization:delete, owner identity and matching slug confirmation; all Memory spaces must be erased first. Treat it as an irreversible administrative action after inspecting dependencies.

Organization creation, workspace selection and leaving are Dashboard workflows. To target another organization in an application, use a separately issued key and client.

Organization methods · Invitation methods

On this page