> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bigcapital.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new role



## OpenAPI

````yaml api-reference/openapi.json post /api/roles
openapi: 3.0.0
info:
  title: Bigcapital
  description: Financial accounting software
  version: '1.0'
  contact: {}
servers: []
security: []
tags: []
paths:
  /api/roles:
    post:
      tags:
        - Roles
      summary: Create a new role
      operationId: RolesController_createRole
      parameters:
        - name: Authorization
          in: header
          description: >-
            Value must be 'Bearer <token>' where <token> is an API key prefixed
            with 'bc_' or a JWT token.
          required: true
          schema:
            type: string
            example: Bearer bc_1234567890abcdef
        - name: organization-id
          in: header
          description: >-
            Required if Authorization is a JWT token. The organization ID to
            operate within.
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateRoleDto'
      responses:
        '200':
          description: Role created successfully
components:
  schemas:
    CreateRoleDto:
      type: object
      properties:
        roleName:
          type: string
          example: admin
          description: The name of the role
        roleDescription:
          type: string
          example: Administrator
          description: The description of the role
        permissions:
          description: The permissions of the role
          type: array
          items:
            $ref: '#/components/schemas/CreateRolePermissionDto'
      required:
        - roleName
        - roleDescription
        - permissions
    CreateRolePermissionDto:
      type: object
      properties:
        subject:
          type: string
          example: subject
          description: The subject of the permission
        ability:
          type: string
          example: read
          description: The action of the permission
        value:
          type: boolean
          example: true
          description: The value of the permission
      required:
        - subject
        - ability
        - value

````