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

# Update Role

> Update role details (name, description, user_type).



## OpenAPI

````yaml put /admin/roles/{role_id}
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /admin/roles/{role_id}:
    put:
      tags:
        - provider
        - admin
        - roles
      summary: Update Role
      description: Update role details (name, description, user_type).
      operationId: update_role_admin_roles__role_id__put
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: role_id
          in: path
          required: true
          schema:
            type: string
            title: Role Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RoleUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RoleDetail'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RoleUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: Updated role name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Updated role description
        userType:
          anyOf:
            - $ref: '#/components/schemas/RoleType'
            - type: 'null'
          description: Updated role type
      type: object
      title: RoleUpdate
    RoleDetail:
      properties:
        id:
          type: string
          title: Id
          description: Unique identifier for the role
        name:
          type: string
          title: Name
          description: Role name (e.g., 'admin', 'user', 'billing_manager')
        userType:
          $ref: '#/components/schemas/RoleType'
          description: Role type (ADMIN, PROVIDER, USER)
        createdDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createddate
          description: When the role was created
        updatedDate:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updateddate
          description: When the role was last updated
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: Description of what this role does
        permissions:
          items:
            type: string
          type: array
          title: Permissions
          description: List of permission strings
      type: object
      required:
        - id
        - name
        - userType
      title: RoleDetail
      description: Extended role information including permissions
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RoleType:
      type: string
      enum:
        - ADMIN
        - PROVIDER
        - USER
      title: RoleType
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````