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

# Create role



## OpenAPI

````yaml post /api/v1/roles
openapi: 3.0.1
info:
  title: Consoled REST APIs
  description: |-
    Once you have gone through the documentation on Bytebeam Cloud, 
                                              you might want to integrate Bytebeam programmatically in your own applications. 
                                              Our REST API is available to you for performing all operations you can do on the Cloud platform UI.
  termsOfService: https://bytebeam.io/terms
  version: 0.0.1
servers:
  - url: https://cloud.bytebeam.io/
security:
  - apiKeyAuth: []
    tenantAuth: []
tags:
  - name: admin
    description: Admin APIs
  - name: devices
    description: Device Management
  - name: data
    description: Data Access APIs
  - name: logs
    description: Audit Logs
  - name: misc
    description: Miscellaneous
externalDocs:
  description: Product Documentation
  url: https://bytebeam.io/docs
paths:
  /api/v1/roles:
    post:
      tags:
        - admin
      summary: Create role
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleSchema'
          application/transit+msgpack:
            schema:
              $ref: '#/components/schemas/RoleSchema'
          application/transit+json:
            schema:
              $ref: '#/components/schemas/RoleSchema'
          application/edn:
            schema:
              $ref: '#/components/schemas/RoleSchema'
        required: true
      responses:
        default:
          description: ''
          content: {}
components:
  schemas:
    RoleSchema:
      required:
        - name
        - permissions
      type: object
      properties:
        name:
          type: string
        permissions:
          $ref: '#/components/schemas/PermissionSchema'
      additionalProperties: false
    PermissionSchema:
      required:
        - allowCreatingDevices
        - allowMarkActionAsCompleted
        - allowedActions
        - createDashboards
        - dashboardPermittedShareRoles
        - devices
        - editActionTypes
        - editDeviceConfigs
        - editFiles
        - editFirmwares
        - editMetadata
        - editMetadataKeys
        - editRoles
        - editStreams
        - editTenantSettings
        - editUsers
        - homepage
        - showActionsTab
        - showDashboardsTab
        - showDeviceManagementTab
        - tables
        - viewActionTypes
        - viewDeviceConfigs
        - viewFiles
        - viewFirmwares
        - viewMetadata
        - viewMetadataKeys
        - viewRoles
        - viewStreams
        - viewUsers
      type: object
      properties:
        editFirmwares:
          type: boolean
        viewFiles:
          type: boolean
        editTenantSettings:
          type: boolean
        homepage:
          type: string
        dashboardPermittedShareRoles:
          type: object
          x-oneOf:
            - type: array
              items:
                type: integer
                format: int64
            - type: string
              enum:
                - all
        viewMetadataKeys:
          type: boolean
        editMetadataKeys:
          type: boolean
        editDeviceConfigs:
          type: boolean
        editRoles:
          type: boolean
        createDashboards:
          type: boolean
        viewRoles:
          type: boolean
        tables:
          type: object
          x-oneOf:
            - $ref: '#/components/schemas/RoleSchemaPermissionsTables'
            - type: string
              enum:
                - all
        allowCreatingDevices:
          type: boolean
        allowedActions:
          type: object
          x-oneOf:
            - type: array
              items:
                type: string
            - type: string
              enum:
                - all
        editFiles:
          type: boolean
        editUsers:
          type: boolean
        showDeviceManagementTab:
          type: boolean
        viewActionTypes:
          type: boolean
        viewDeviceConfigs:
          type: boolean
        editStreams:
          type: boolean
        viewStreams:
          type: boolean
        editActionTypes:
          type: boolean
        allowMarkActionAsCompleted:
          type: boolean
        showActionsTab:
          type: boolean
        viewUsers:
          type: boolean
        showDashboardsTab:
          type: boolean
        viewMetadata:
          type: object
          x-oneOf:
            - type: array
              items:
                type: string
            - type: string
              enum:
                - all
        editMetadata:
          type: object
          x-oneOf:
            - type: array
              items:
                type: string
            - type: string
              enum:
                - all
        devices:
          $ref: '#/components/schemas/RoleSchemaPermissionsDevices'
        viewFirmwares:
          type: boolean
      additionalProperties: false
    RoleSchemaPermissionsDevices:
      type: object
      additionalProperties:
        type: object
        x-oneOf:
          - type: array
            items:
              type: string
          - type: string
            enum:
              - all
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      name: x-bytebeam-api-key
      in: header
      description: API key required to authenticate requests.
    tenantAuth:
      type: apiKey
      name: x-bytebeam-tenant
      in: header
      description: Tenant(Project) name required to identify the project.

````