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

# Update Role

> Edit an existing role by ID for a specific workspace



## OpenAPI

````yaml PATCH /api/v1/mgt/workspaces/{workspaceId}/roles/{roleId}
openapi: 3.1.0
info:
  title: Xenia Team API - Update Role
  version: 1.0.0
  description: Update a role by its ID for a given workspace
servers:
  - url: https://api.xenia.team
security: []
paths:
  /api/v1/mgt/workspaces/{workspaceId}/roles/{roleId}:
    patch:
      tags:
        - Roles
      summary: Update Role
      description: Edit an existing role by ID for a specific workspace
      parameters:
        - name: workspaceId
          in: path
          required: true
          description: Workspace ID
          schema:
            type: string
            format: uuid
        - name: roleId
          in: path
          required: true
          description: Role ID
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRoleRequest'
            example:
              permissions:
                - 7790c9eb-8d55-4fe0-a52d-2e5e769e9588
                - dbf2e476-c880-4f1c-9ac6-a44bc3c0c9a7
              title: New Role Title - edit
              description: New Role test description
              reportTo: 43bc03d0-e0c5-41a1-bc13-2d232a40a728
              homepage:
                mobile: PULSE
                web: PULSE
                dashboard: {}
      responses:
        '200':
          description: Role successfully updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  meta:
                    type: object
              example:
                meta: {}
        '400':
          description: Bad Request - Invalid input
        '401':
          description: Unauthorized - Missing or invalid authentication
        '403':
          description: Forbidden - Insufficient permissions
        '404':
          description: Not Found - Role does not exist
        '500':
          description: Internal Server Error
      security:
        - clientKey: []
          clientSecret: []
components:
  schemas:
    UpdateRoleRequest:
      type: object
      properties:
        permissions:
          type: array
          items:
            type: string
            format: uuid
          description: List of permission IDs
        title:
          type: string
          description: Role title
        description:
          type: string
          description: Role description
        reportTo:
          type: string
          format: uuid
          description: Role ID that this role reports to
        homepage:
          type: object
          properties:
            mobile:
              type: string
            web:
              type: string
            dashboard:
              type: object
  securitySchemes:
    clientKey:
      type: apiKey
      in: header
      name: x-client-key
      description: Client API key for authentication
    clientSecret:
      type: apiKey
      in: header
      name: x-client-secret
      description: Client secret for authentication

````