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

# Edit Role Definition

> A `PUT` to the `/roles/definitions/{id}` endpoint allows your application to edit role definition.



## OpenAPI

````yaml put /v3/roles/definitions/{definition}
openapi: 3.1.0
info:
  title: Omneo
  version: 0.0.1
servers:
  - url: https://api.{tenant}.getomneo.com/api
    variables:
      tenant:
        default: example
security: []
paths:
  /v3/roles/definitions/{definition}:
    put:
      tags:
        - Role Definition
      summary: Edit Role Definition
      description: >-
        A `PUT` to the `/roles/definitions/{id}` endpoint allows your
        application to edit role definition.
      operationId: roles.definitions.update
      parameters:
        - name: definition
          in: path
          required: true
          description: The definition ID
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateRoleDefinition'
      responses:
        '200':
          description: '`RoleDefinition`'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/RoleDefinition'
                required:
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    UpdateRoleDefinition:
      type: object
      properties:
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        short_description:
          type:
            - string
            - 'null'
        icon:
          type:
            - string
            - 'null'
          format: uri
        image_url:
          type:
            - string
            - 'null'
          format: uri
        period:
          type:
            - integer
            - 'null'
        period_type:
          type:
            - string
            - 'null'
          enum:
            - days
            - weeks
            - months
            - years
            - absolute_date
            - absolute_week
            - absolute_month
        absolute_expiry:
          type:
            - string
            - 'null'
        notes:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items:
            type: string
        group_name:
          type:
            - string
            - 'null'
        group_handle:
          type:
            - string
            - 'null'
        custom_fields:
          type: array
          items:
            type: object
            properties:
              namespace:
                type: string
              handle:
                type: string
              type:
                type: string
                enum:
                  - string
                  - integer
                  - float
                  - boolean
                  - json
                  - array
              value:
                type: string
            required:
              - namespace
              - handle
              - type
              - value
      title: UpdateRoleDefinition
    RoleDefinition:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        handle:
          type: string
        description:
          type:
            - string
            - 'null'
        short_description:
          type:
            - string
            - 'null'
        icon:
          type:
            - string
            - 'null'
        image_url:
          type:
            - string
            - 'null'
        timezone:
          type:
            - string
            - 'null'
        period:
          type:
            - integer
            - 'null'
        period_type:
          type:
            - string
            - 'null'
        absolute_expiry:
          type:
            - string
            - 'null'
        group_name:
          type:
            - string
            - 'null'
        group_handle:
          type:
            - string
            - 'null'
        notes:
          type:
            - string
            - 'null'
        meta:
          type:
            - array
            - 'null'
          items: {}
        custom_fields:
          type: object
          additionalProperties: {}
        created_at:
          type: string
        updated_at:
          type: string
      required:
        - id
        - name
        - handle
        - description
        - short_description
        - icon
        - image_url
        - timezone
        - period
        - period_type
        - absolute_expiry
        - group_name
        - group_handle
        - notes
        - meta
        - custom_fields
        - created_at
        - updated_at
      title: RoleDefinition
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors

````