For the complete documentation index, see llms.txt. This page is also available as Markdown.

Create Role

Create a new custom role for project.

A role bundles one or more policies and is assigned to users to control what they can do — this is Norbix's role-based access control (RBAC). Roles are project-scoped and managed in the Membership module. This method creates the role; the response returns its id.

This method is on the Hub surface (norbix.hub.membership) — call it from admin tooling or IaC.

These examples assume the SDK is installed and your credentials are set as environment variables — each client reads them automatically, so the constructors below take no arguments. See Install a Norbix SDK.

import { Norbix } from '@norbix.ai/ts';
const norbix = new Norbix();

const result = await norbix.hub.membership.createRole({
  roleName: 'content-editor',
  description: 'Can create and edit content, but not manage billing or members.',
  policies: ['pol_7Uhn615iG5KLwiIYGkxSIG', 'pol_1k4ufY10onE6beVi6Hp7I3'],
});
using Norbix.Sdk;
using Norbix.Sdk.Types.Hub;

using var client = new NorbixClient();

var result = await client.Membership.CreateRoleAsync(new CreateRole
{
    RoleName = "content-editor",
    Description = "Can create and edit content, but not manage billing or members.",
    Policies = new[] { "pol_7Uhn615iG5KLwiIYGkxSIG", "pol_1k4ufY10onE6beVi6Hp7I3" },
});
from norbix_python import NorbixHub

norbix = NorbixHub()

result = norbix.membership.create_role(
    roleName="content-editor",
    description="Can create and edit content, but not manage billing or members.",
    policies=["pol_7Uhn615iG5KLwiIYGkxSIG", "pol_1k4ufY10onE6beVi6Hp7I3"],
)

In the dashboard

Manage this visually in Norbix Cloud — see Membership → Roles.

API reference

Full request and response for this endpoint: Create Role.

Last updated