> For the complete documentation index, see [llms.txt](https://docs.codemash.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.codemash.io/cloud/membership/roles/new.md).

# Create a role

**Where:** Membership → Roles → New · `/projects/<project>/membership/roles/new`

{% hint style="info" %}
Screenshot TODO — capture comes from testing-plan area **16-membership**.
{% endhint %}

Roles group one or more policies that can be assigned to users.

## Fields

| Field             | What it does                                                                                           |
| ----------------- | ------------------------------------------------------------------------------------------------------ |
| Role name         | Required. The role's name, e.g. `content-editor`. It cannot be changed after the role is created.      |
| Description       | Optional free text explaining what the role is for.                                                    |
| Attached policies | A searchable picker of the project's policies. Expand a policy to preview the JSON document it grants. |

After **Save** the role appears in the roles list and can be assigned to users on the [Users](/cloud/membership/users.md) screen. The role gets a composite id — project + role — for example `pr_4kX9mQvR2tYw7ZbC1dFgHj_nr_7pW2sKvB9qLm3XcT1yRfGh`; this is the value that travels in role assignments.

## Example

Create `content-editor` with the description "Can edit database records" and attach the policies `database-read` and `database-write`. Every user who gets this role receives the union of both policies' permissions.

## Use it from code

[Membership → Roles](/sdks-and-cli/membership/roles.md)

## API reference

Endpoints: [Membership → Roles](/api-reference/membership/roles.md).
