---
title: "Role"
description: "Role"
url: "https://www.contentstack.com/docs/developers/sdks/content-management-sdk/dot-net/reference/role"
product: "Contentstack"
doc_type: "guide"
audience:
  - developers
  - admins
version: "current"
last_updated: "2026-09-13"
---

# Role

## Role

A Role is a collection of permissions that applies to all the users who are assigned to it. Using Roles, you can assign permissions to a group of users rather than assigning permissions individually.

## Create

The Create request creates a new role in a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Role("<ROLE_UID>").Create(model);
```

Role Model for creating Role.

Query parameter collection.

## CreateAsync

The Create request creates a new role in a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").CreateAsync(model);
```

Role Model for creating Role.

Query parameter collection.

## Delete

The Delete call deletes an existing role from your stack

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").Delete();
```

Query parameter collection.

## DeleteAsync

The Delete call deletes an existing role from your stack

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").DeleteAsync();
```

Query parameter collection.

## Fetch

The Fetch request returns comprehensive information on a specific role.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Role("<ROLE_UID>").Fetch();
```

Query parameter collection.

## FetchAsync

The Fetch request returns comprehensive information on a specific role.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").FetchAsync();
```

Query parameter collection.

## Query

The Query on Role request returns comprehensive information about all roles created in a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
Query query = client.Stack("<API_KEY>").Role().Query();
```

## Update

The Update request creates a new role in a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = client.Stack("<API_KEY>").Role("<ROLE_UID>").UpdateAsync(model);
```

Role Model for creating Role.

Query parameter collection.

## UpdateAsync

The Update request creates a new role in a stack.

```
using Contentstack.Management.Core;
using Contentstack.Management.Core.Models;

ContentstackClient client = new ContentstackClient("<AUTHTOKEN>");
RoleModel model = new RoleModel(); 
ContentstackResponse contentstackResponse = await client.Stack("<API_KEY>").Role("<ROLE_UID>").UpdateAsync(model);
```

Role Model for creating Role.

Query parameter collection.

## Rules

Base class for all rules in stack.

ACL for the rule

Set true to restrict rule.

## AssetRules

Rules for setting on Assets.

List of asset for adding into rule.

Modules for the rules to be applied.

## BranchAliasRules

Rules for setting on branch alias.

List of branch alias for adding into rule.

Modules for the rules to be applied.

## BranchRules

Rules for setting on branch.

List of branch for adding into rule.

Modules for the rules to be applied.

## ContentTypeRules

Rules for setting on content type.

List of content types for adding into rule.

Modules for the rules to be applied.

## EnvironmentRules

Rules for setting on environment.

List of environments for adding into rule.

Modules for the rules to be applied.

## FolderRules

Rules for setting on folders.

List of folders for adding into rule.

Modules for the rules to be applied.

## FieldRules

Rule for the field in content type.

List of action for the field rules.

List of conditions for the field rules.

Match type for the field.

## TaxonomyRules

Rule for the field in taxonomy.

List of Taxonomies for adding into rule

List of Terms for adding into rule.

List of TaxonomyContentType for adding into this rule

## Role | .NET Management SDK | Contentstack

Role is a collection of permissions assigned to users, letting you grant access to a group rather than configuring each user individually.