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

# Update a custom role



## OpenAPI

````yaml /swagger/5.16/ai-studio-swagger.yml patch /rbac/roles/{id}
openapi: 3.0.1
info:
  title: Midsommar API
  description: This is the API for the Midsommar user and group management system.
  termsOfService: http://swagger.io/terms/
  contact:
    name: API Support
    url: http://www.swagger.io/support
    email: support@swagger.io
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
  version: '1.0'
servers:
  - url: //localhost:8080/api/v1
security: []
paths:
  /rbac/roles/{id}:
    patch:
      tags:
        - rbac
      summary: Update a custom role
      parameters:
        - name: id
          in: path
          description: Role ID
          required: true
          schema:
            type: integer
      requestBody:
        description: Role
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/api.RoleInput'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/api.RoleResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    api.RoleInput:
      type: object
      properties:
        description:
          type: string
        name:
          type: string
        permissions:
          type: array
          items:
            type: string
      description: Role input model
    api.RoleResponse:
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/api.RoleAttributes'
        id:
          type: string
        type:
          type: string
      description: Role response model
    api.RoleAttributes:
      type: object
      properties:
        created_at:
          type: string
        description:
          type: string
        groups_count:
          type: integer
        is_system:
          type: boolean
        name:
          type: string
        orphaned_permissions:
          type: array
          description: >-
            OrphanedPermissions are held permissions whose resource is not in
            the

            catalogue right now: grants on a plugin that is uninstalled or not

            loaded. They stay on the role and take effect again when the plugin

            returns; the role editor lists them separately.
          items:
            type: string
        permissions:
          type: array
          items:
            type: string
        slug:
          type: string
        updated_at:
          type: string
        users_count:
          type: integer
      description: Role attributes
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````