---
title: "Create a new role."
method: POST
path: "/v2/security/rbac"
tags: ["RBAC"]
---

# Create a new role.

`POST /v2/security/rbac`

## Request

- Base URL: `https://docs.tetrate.io` (the document declares no server; this is the origin it was published from)
- URL: `https://docs.tetrate.io/v2/security/rbac`
- Auth: none declared
- TypeScript: <https://skmtc.dev/tetrate/apis/tetrate-service-bridge-api/docs/v2/security/rbac/post.ts> (a function with typed inputs; its response is checked against the schema)

## Request body

- V2CreateRoleRequest: Request to create a Role.
  - `name` string, required: The short name for the resource to be created.
  - `role` V2Role, required: `Role` is a named collection of permissions that can be assigned to any user or team in the system.
    - `fqn` string
    - `displayName` string
    - `etag` string
    - `description` string
    - `rules` RoleRule[]: A set of rules that define the permissions associated with each API group.
      - `types` RoleResourceType[]: The set of API groups and the api Kinds within the group on which this rule is applicable. If omitted, the permissions will globally apply to all resource types.
        - `apiGroup` string, required: A specific API group such as traffic.tsb.tetrate.io/v2.
        - `kinds` string[]: Specific kinds of APIs under the API group. If omitted, the role will apply to all kinds under the group.
      - `permissions` V2Permission[], required: The set of actions allowed for these APIs. The current version supports requires the kind, but this constraint will be relaxed in upcoming releases so that rules can apply globally to an entire API group.

## Response `200`

A successful response.

- V2Role: `Role` is a named collection of permissions that can be assigned to any user or team in the system.
  - `fqn` string
  - `displayName` string
  - `etag` string
  - `description` string
  - `rules` RoleRule[]: A set of rules that define the permissions associated with each API group.
    - `types` RoleResourceType[]: The set of API groups and the api Kinds within the group on which this rule is applicable. If omitted, the permissions will globally apply to all resource types.
      - `apiGroup` string, required: A specific API group such as traffic.tsb.tetrate.io/v2.
      - `kinds` string[]: Specific kinds of APIs under the API group. If omitted, the role will apply to all kinds under the group.
    - `permissions` V2Permission[], required: The set of actions allowed for these APIs. The current version supports requires the kind, but this constraint will be relaxed in upcoming releases so that rules can apply globally to an entire API group.

## Other responses

- `default`: An unexpected error response.

---

[API](https://skmtc.dev/tetrate/apis/tetrate-service-bridge-api.md) - [All operations](https://skmtc.dev/tetrate/apis/tetrate-service-bridge-api/llms.txt) - [OpenAPI document](https://skmtc.dev/tetrate/apis/tetrate-service-bridge-api/revisions/2f19c3a1ae57?raw)
