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

# Create a Role

> Create a role



## OpenAPI

````yaml post /workspace/{workspaceId}/roles
openapi: 3.0.3
info:
  title: Hyra API
  description: Hyra Monolythic API
  version: 2.0.0
servers:
  - url: https://api.hyra.io
security: []
paths:
  /workspace/{workspaceId}/roles:
    post:
      tags:
        - Workspace
      description: Create a role
      parameters:
        - schema:
            type: string
          in: path
          name: workspaceId
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                group_roles:
                  type: array
                  items:
                    type: string
                permissions:
                  type: array
                  items:
                    type: string
                manual_users:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  name:
                    type: string
                  group_roles:
                    type: array
                    items:
                      type: string
                  permissions:
                    type: array
                    items:
                      type: string
                  manual_users:
                    type: array
                    items:
                      type: string
                  _id:
                    type: string
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````