# Create a new role

Add a new role for a specific account (tenant).

Include the required permissions in the request body to customize the role.

Endpoint: POST /resources/roles/v2
Version: 1.0
Security: bearer

## Security:

  - `bearer` (unknown)
    http bearer JWT

## Header parameters:

  - `frontegg-tenant-id` (string)
    For relating a role to a specific account (tenant), use `get accounts (tenants)` API to find the account (tenant) Ids

## Request fields (application/json):

  - `key` (string, required)

  - `name` (string, required)

  - `description` (string)

  - `isDefault` (boolean)
    This role will be assigned for every user that will be added without specified roles

  - `baseRoleId` (string, required)
    Role level of the new role will be based on this parameter

  - `permissionIds` (array, required)

## Response 200 fields (application/json):

  - `id` (string, required)

  - `vendorId` (string, required)

  - `tenantId` (string, required)

  - `key` (string, required)

  - `name` (string, required)

  - `description` (string, required)

  - `isDefault` (boolean, required)

  - `permissions` (array, required)

