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

# Update Role

> Partial update of a custom role. Note: role_type is immutable.

Partial update of a custom role. Note that `role_type` is immutable.


## OpenAPI

````yaml openapi/organizations/update-role.json PATCH /organizations/roles/{role_id}
openapi: 3.1.0
info:
  title: Roles API - Update
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
security:
  - sec0: []
    sec1: []
paths:
  /organizations/roles/{role_id}:
    patch:
      summary: Update Role
      description: 'Partial update of a custom role. Note: role_type is immutable.'
      operationId: update-role
      parameters:
        - name: role_id
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the role.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  maxLength: 255
                description:
                  type: string
                  maxLength: 1024
                permission_ids:
                  type: array
                  items:
                    type: string
                testing_permission_ids:
                  type: array
                  items:
                    type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                  name:
                    type: string
                  description:
                    type: string
                    nullable: true
                  admin:
                    type: boolean
                  permission_ids:
                    type: array
                    items:
                      type: string
                  testing_permission_ids:
                    type: array
                    items:
                      type: string
                  role_type:
                    type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
        '400':
          description: Bad Request - Validation failure
        '404':
          description: Not Found - Role not found in organization
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: PUBLIC-API-KEY
      x-default: <Your PUBLIC-API-KEY>
    sec1:
      type: apiKey
      in: header
      name: PRIVATE-SECRET-KEY
      x-default: <Your PRIVATE-SECRET-KEY>

````