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

# Update a Role

> Updates a Role's information.



## OpenAPI

````yaml /es/openapi/v3-current/AM-identity.yaml patch /v1/roles/{id}
openapi: 3.0.1
info:
  contact: {}
  description: This is a swagger documentation for the Identity API
  termsOfService: http://swagger.io/terms/
  title: Identity API
  version: 1.0.0
servers:
  - url: //localhost:4001/
security: []
paths:
  /v1/roles/{id}:
    patch:
      tags:
        - Roles
      summary: Update a Role
      description: Updates a Role's information.
      parameters:
        - description: Role ID
          in: path
          name: id
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleUpdateInput'
        description: Role Update Input
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleResponse'
          description: OK
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg.HTTPError'
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg.HTTPError'
          description: Not Found
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/pkg.HTTPError'
          description: Internal Server Error
      security:
        - BearerAuth: []
components:
  schemas:
    RoleUpdateInput:
      description: RoleUpdateInput payload
      example:
        displayName: Updated Editor
        isEnabled: true
        description: An updated description
      properties:
        description:
          description: >-
            Role's description. Use a pointer to distinguish "not sent" (nil)
            from "clear it" (pointer to "").
          example: An updated description
          type: string
        displayName:
          description: Role's display name.
          example: Updated Editor
          type: string
        isEnabled:
          description: Whether the role is enabled.
          example: true
          type: boolean
      type: object
    RoleResponse:
      description: RoleResponse payload
      example:
        isSystem: false
        createdAt: '2026-06-24T10:00:00.000Z'
        isEnabled: true
        roles:
          - roles
          - roles
        name: Custom Editor
        description: A custom editor role
        groups:
          - groups
          - groups
        id: custom-editor
        users:
          - users
          - users
      properties:
        createdAt:
          example: '2026-06-24T10:00:00.000Z'
          type: string
        description:
          example: A custom editor role
          type: string
        groups:
          items:
            type: string
          type: array
        id:
          example: custom-editor
          type: string
        isEnabled:
          example: true
          type: boolean
        isSystem:
          description: >-
            Whether the role is a platform-managed system role, immutable
            through this API.

            Never omitempty: false must travel so a consumer does not read a
            missing key

            as "not a system role".
          example: false
          type: boolean
        name:
          example: Custom Editor
          type: string
        roles:
          items:
            type: string
          type: array
        users:
          items:
            type: string
          type: array
      type: object
    pkg.HTTPError:
      properties:
        code:
          type: string
        entityType:
          type: string
        err:
          type: object
        message:
          type: string
        title:
          type: string
      type: object
  securitySchemes:
    BearerAuth:
      description: 'Bearer authentication. Send Authorization: Bearer <token>.'
      in: header
      name: Authorization
      type: apiKey

````