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

# Update an App Access Role

> Update a Role. The application cannot be changed. Passing `provisioning_actions` or `deprovisioning_actions` replaces the whole list.



## OpenAPI

````yaml put /v1/app_access/roles/{uid}
openapi: 3.0.1
info:
  title: Siit Public API
  version: v0
servers:
  - url: https://api.siit.io
security: []
paths:
  /v1/app_access/roles/{uid}:
    parameters:
      - name: uid
        in: path
        description: The UID of the App Access Role
        required: true
        schema:
          type: string
    put:
      tags:
        - App Access Role
      summary: Update an App Access Role
      description: >-
        Update a Role. The application cannot be changed. Passing
        `provisioning_actions` or `deprovisioning_actions` replaces the whole
        list.
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/app_access_role_write'
      responses:
        '200':
          description: Successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/updated_app_access_role_object'
        '404':
          description: not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/errors_object'
      security:
        - bearer: []
components:
  schemas:
    app_access_role_write:
      type: object
      description: >-
        Request body for creating or updating an App Access Role. Pass UIDs (not
        objects) for relationship fields.
      properties:
        name:
          type: string
          nullable: false
        application:
          type: string
          description: >-
            The application this Role grants access to. Required on create,
            immutable afterwards. Pass the UID of the related object.
          nullable: false
        approval_policy:
          type: string
          description: >-
            The approval policy used when `approval_mode` is `approval_policy`.
            Defaults to the company default policy. Pass the UID of the related
            object.
          nullable: true
        approval_mode:
          type: string
          enum:
            - approval_policy
            - auto_approve
            - auto_reject
            - skip_approval
          default: approval_policy
        business_reason_required:
          type: boolean
        is_restricted_to_audience:
          type: boolean
        audience:
          $ref: '#/components/schemas/audience'
        duration:
          type: string
          enum:
            - fixed
            - none
            - optional
            - required
            - required_and_limited
          default: none
        max_duration_minutes:
          type: integer
          nullable: true
          description: Required when `duration` is `required_and_limited` or `fixed`
        max_duration_unit:
          type: string
          enum:
            - days
            - hours
            - minutes
            - months
            - weeks
          nullable: true
        provisioning_actions:
          type: array
          items:
            type: object
          description: >-
            Replaces the actions run when access is granted: a single action, or
            an automated action followed by one `manual` action. At least one is
            required. Validate against `GET
            /v1/app_access/roles/provisioning_actions_schema`.
        deprovisioning_actions:
          type: array
          items:
            type: object
          description: >-
            Replaces the actions run when access is revoked: none, a single
            action, or an automated action followed by one `manual` action.
            Validate against `GET
            /v1/app_access/roles/provisioning_actions_schema`.
    updated_app_access_role_object:
      type: object
      properties:
        result:
          $ref: '#/components/schemas/app_access_role'
    errors_object:
      type: object
      properties:
        error:
          type: string
        troubleshoot:
          type: string
    audience:
      type: object
      description: >-
        People who can see the record when `is_restricted_to_audience` is true.
        A person matches when every matcher matches. Without a `status` matcher,
        `status = employee` is added. Writing it replaces all the matchers.
      properties:
        matchers:
          type: array
          items:
            type: object
            properties:
              data_point:
                type: string
                enum:
                  - contract_type
                  - country
                  - department_uid
                  - job_title
                  - legal_entity_uid
                  - lifecycle
                  - office_location_uid
                  - preferred_language
                  - status
                  - team_uids
                  - uid
                description: >-
                  The person attribute to compare. UID data points take UIDs
                  (e.g. Team UIDs for `team_uids`).
              comparator:
                type: string
                enum:
                  - '='
                  - <>
                description: '`=` matches any of the values, `<>` matches none of them'
              values:
                type: array
                items:
                  type: string
            required:
              - data_point
              - comparator
              - values
    app_access_role:
      type: object
      properties:
        uid:
          type: string
          readOnly: true
          description: The UID of the App Access Role
        name:
          type: string
          description: The Role name, unique per application
        application:
          oneOf:
            - type: string
              description: UID when not expanded
            - $ref: '#/components/schemas/application'
          description: >-
            The application this Role grants access to. Pass
            `?expand[]=field_name` for full object.
          nullable: false
        approval_policy:
          anyOf:
            - type: string
              description: UID when not expanded
            - type: object
              description: The approval policy object
          description: >-
            The approval policy used when `approval_mode` is `approval_policy`,
            null otherwise. Pass `?expand[]=approval_policy` for full object.
          nullable: true
        approval_mode:
          type: string
          enum:
            - approval_policy
            - auto_approve
            - auto_reject
            - skip_approval
          description: How access requests for this Role are approved
        business_reason_required:
          type: boolean
          description: Whether requesters must provide a business reason
        is_restricted_to_audience:
          type: boolean
          description: Whether only the Role audience can request it
        audience:
          $ref: '#/components/schemas/audience'
        duration:
          type: string
          enum:
            - fixed
            - none
            - optional
            - required
            - required_and_limited
          description: >-
            Whether requesters must pick an access duration, and whether it is
            limited or fixed
        max_duration_minutes:
          type: integer
          nullable: true
          description: >-
            Maximum (or fixed) access duration in minutes, regardless of display
            unit. Used when `duration` is `required_and_limited` or `fixed`.
        max_duration_unit:
          type: string
          enum:
            - days
            - hours
            - minutes
            - months
            - weeks
          nullable: true
          description: >-
            Display unit of `max_duration_minutes`, which must be divisible by
            it
        provisioning_actions:
          type: array
          items:
            type: object
          description: >-
            Actions run when access is granted. See `GET
            /v1/app_access/roles/provisioning_actions_schema` for the accepted
            shapes.
        deprovisioning_actions:
          type: array
          items:
            type: object
          description: >-
            Actions run when access is revoked. See `GET
            /v1/app_access/roles/provisioning_actions_schema` for the accepted
            shapes.
        created_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
    application:
      type: object
      properties:
        uid:
          type: string
          readOnly: true
          description: The UID of the Application
        admin_permalink_url:
          type: string
          description: The link to the Application in Siit admin dashboard
          readOnly: true
        archived_at:
          type: string
          nullable: true
          format: date-time
          readOnly: true
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
        about:
          type: string
          description: A short description of the Application
          nullable: true
        app_link:
          type: string
          description: The URL to the Application
          nullable: false
        app_owner:
          anyOf:
            - type: string
              description: UID when not expanded
            - $ref: '#/components/schemas/user'
            - $ref: '#/components/schemas/team'
            - $ref: '#/components/schemas/team_inbox'
          description: >-
            The App owner: a User, a Team or a Team inbox. Teams and Team
            inboxes share the tv_ UID prefix. Expand the owner to distinguish
            their representations: only a Team inbox includes members. Expanding
            a Team or Team inbox owner requires the matching `admin.teams.read`
            or `admin.team_inboxes.read` scope. On write, accepts the UID of a
            User, a Team or a Team inbox of the company. Pass
            `?expand[]=field_name` for full object.
          nullable: true
        app_owner_uid:
          type: string
          description: >-
            DEPRECATED: Use `app_owner` instead. The UID of the app owner (User,
            Team or Team inbox).
          nullable: true
          deprecated: true
        app_owner_backup:
          anyOf:
            - type: string
              description: UID when not expanded
            - $ref: '#/components/schemas/user'
            - $ref: '#/components/schemas/team'
            - $ref: '#/components/schemas/team_inbox'
          description: >-
            The App owner backup: a User, a Team or a Team inbox. Teams and Team
            inboxes share the tv_ UID prefix. Expand the owner to distinguish
            their representations: only a Team inbox includes members. Expanding
            a Team or Team inbox owner requires the matching `admin.teams.read`
            or `admin.team_inboxes.read` scope. On write, accepts the UID of a
            User, a Team or a Team inbox of the company. Pass
            `?expand[]=field_name` for full object.
          nullable: true
        app_owner_backup_uid:
          type: string
          description: >-
            DEPRECATED: Use `app_owner_backup` instead. The UID of the app owner
            backup (User, Team or Team inbox).
          nullable: true
          deprecated: true
        created_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        currency:
          type: string
          nullable: true
        discovered_at:
          type: string
          format: date
          description: date formatted as ISO 8601 (e.g. "2020-12-15")
        lifecycle:
          type: string
          description: Empty when `status` is not "approved"
          enum:
            - active
            - cost_optimization
            - deprecated
            - evaluating
            - security_assessment
          nullable: true
        name:
          type: string
          description: The Application name
          nullable: false
        renewal_date:
          type: string
          format: date
          description: date formatted as ISO 8601 (e.g. "2020-12-15")
          nullable: true
        status:
          type: string
          description: The status of the Application
          enum:
            - approved
            - discovered
            - restricted
          default: discovered
        total_annual_cost:
          type: number
          description: Application's annual cost.
          default: 0
          nullable: true
        updated_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        instances:
          anyOf:
            - type: array
              items:
                type: string
            - type: array
              items:
                $ref: '#/components/schemas/application_instance'
          description: >-
            Application instances from providers. Pass `?expand[]=field_name`
            for full objects.
          nullable: true
          readOnly: true
        users_count:
          type: integer
          description: Number of Siit users attached to the Application
          readOnly: true
    user:
      type: object
      properties:
        birthday_date:
          type: string
          format: date
          description: date formatted as ISO 8601 (e.g. "2020-12-15")
          nullable: true
        city:
          type: string
          nullable: true
        contract_type:
          type: string
          nullable: true
          enum:
            - contract
            - expat
            - fulltime
            - intern
            - parttime
            - temporary
        country:
          type: string
          description: 'ISO3166 alpha-2 country code (e.g: "PT")'
          nullable: true
        employee_number:
          type: string
          nullable: true
        first_name:
          type: string
          nullable: true
        gender:
          type: string
          enum:
            - female
            - male
            - non_binary
            - other
            - prefer_not_to_disclose
          nullable: true
        hire_date:
          type: string
          format: date
          description: date formatted as ISO 8601 (e.g. "2020-12-15")
          nullable: true
        job_leave_date:
          type: string
          format: date
          description: date formatted as ISO 8601 (e.g. "2020-12-15")
          nullable: true
        job_start_date:
          type: string
          format: date
          description: date formatted as ISO 8601 (e.g. "2020-12-15")
          nullable: true
        job_title:
          type: string
          nullable: true
        last_name:
          type: string
          nullable: true
        last_working_date:
          type: string
          format: date
          description: date formatted as ISO 8601 (e.g. "2020-12-15")
          nullable: true
        metadata:
          type: object
          description: >-
            Arbitrary key/value pairs attached to the User (max 10 keys, string
            values of at most 255 characters). Passed keys are merged into the
            existing metadata: absent keys are preserved, passing a key with an
            empty or null value removes it, and passing metadata as an empty
            string removes all keys.
          maxProperties: 10
          additionalProperties:
            type: string
            maxLength: 255
        preferred_language:
          type: string
          description: A language in IETF format (en-US, pt-PT, fr-FR...)
          nullable: true
        probation_end_date:
          type: string
          format: date
          description: date formatted as ISO 8601 (e.g. "2020-12-15")
          nullable: true
        work_phone:
          type: string
          nullable: true
        uid:
          type: string
          description: The UID of the User
          readOnly: true
        admin_permalink_url:
          type: string
          description: The link to the User in Siit admin dashboard
          readOnly: true
        archived_at:
          type: string
          nullable: true
          format: date-time
          readOnly: true
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
        created_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        department:
          oneOf:
            - type: string
              description: UID when not expanded
            - $ref: '#/components/schemas/department'
          description: >-
            The department this user belongs to. Pass `?expand[]=field_name` for
            full object.
          nullable: true
        department_uid:
          type: string
          description: 'DEPRECATED: Use `department` instead. A Department UID'
          nullable: true
          deprecated: true
        emails:
          type: array
          description: An array of all the known emails for this User
          readOnly: true
          items:
            type: string
        full_name:
          type: string
          description: The full name of the User
          readOnly: true
          nullable: true
        legal_entity:
          oneOf:
            - type: string
              description: UID when not expanded
            - $ref: '#/components/schemas/legal_entity'
          description: >-
            The legal entity this user belongs to. Pass `?expand[]=field_name`
            for full object.
          nullable: true
        legal_entity_uid:
          type: string
          description: 'DEPRECATED: Use `legal_entity` instead. A Legal Entity UID'
          nullable: true
          deprecated: true
        microsoft_entra_ids:
          description: The Microsoft Entra IDs (Azure Directory) associated with that User
          type: array
          readOnly: true
          items:
            type: string
        microsoft_entra_group_ids:
          description: >-
            The Microsoft Entra Group IDs (Azure Directory) associated to that
            User
          type: array
          readOnly: true
          items:
            type: string
        office_location:
          oneOf:
            - type: string
              description: UID when not expanded
            - $ref: '#/components/schemas/office_location'
          description: >-
            The office location of this user. Pass `?expand[]=field_name` for
            full object.
          nullable: true
        office_location_uid:
          type: string
          description: 'DEPRECATED: Use `office_location` instead. An Office Location UID'
          nullable: true
          deprecated: true
        report_to:
          oneOf:
            - type: string
              description: UID when not expanded
            - $ref: '#/components/schemas/user'
          description: >-
            The manager of this user. Pass `?expand[]=field_name` for full
            object.
          nullable: true
        report_to_uid:
          type: string
          description: >-
            DEPRECATED: Use `report_to` instead. The UID of the manager of this
            user
          nullable: true
          deprecated: true
        role_name:
          type: string
          description: The role of the User
          readOnly: true
          enum:
            - owner
            - admin
            - it
            - hr
            - ops
            - finance
            - custom
            - user
        slack_user_id:
          type: string
          description: The Slack user ID of the User (e.g. U0G9QF9C6)
          readOnly: true
          nullable: true
        status:
          type: string
          description: The status of the User
          readOnly: true
          enum:
            - alumni
            - employee
            - external
            - hired
          default: employee
        team_uids:
          type: array
          description: 'DEPRECATED: Use `teams` instead. An array of Team UIDs'
          items:
            type: string
          deprecated: true
        teams:
          anyOf:
            - type: array
              items:
                type: string
            - type: array
              items:
                $ref: '#/components/schemas/team'
          description: >-
            Teams this user belongs to. Pass `?expand[]=field_name` for full
            objects.
          nullable: true
        timezone:
          type: string
          description: ''
          readOnly: true
          nullable: true
        updated_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
    team:
      type: object
      properties:
        uid:
          type: string
          readOnly: true
          description: The UID of the Team
        created_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        value:
          type: string
          description: The Team name
    team_inbox:
      type: object
      properties:
        uid:
          type: string
          readOnly: true
          description: The UID of the Team Inbox
        members:
          type: array
          items:
            $ref: '#/components/schemas/team_inbox_member'
          description: Members of the inbox
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        value:
          type: string
          description: The Team Inbox name
    application_instance:
      type: object
      properties:
        uid:
          type: string
          readOnly: true
          description: The UID of the Application Instance
        provider:
          type: string
          description: The provider that manages this instance
          enum:
            - corma
            - google_admin
            - jumpcloud_actions
            - ms_entra
            - okta_actions
        external_id:
          type: string
          description: The external identifier from the provider
        instance_url:
          type: string
          description: The URL of the application instance
          nullable: true
        instance_name:
          type: string
          description: The name of the application instance
          nullable: true
        created_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
    department:
      type: object
      properties:
        uid:
          type: string
          readOnly: true
          description: The UID of the Department
        created_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        value:
          type: string
          description: The Department name
    legal_entity:
      type: object
      properties:
        uid:
          type: string
          readOnly: true
          description: The UID of the Legal Entity
        created_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        value:
          type: string
          description: The Legal Entity name
    office_location:
      type: object
      properties:
        uid:
          type: string
          readOnly: true
          description: The UID of the Office Location
        created_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        updated_at:
          type: string
          format: date-time
          description: datetime formatted as ISO 8601 (e.g. "2020-12-15T03:34:13.000Z")
          readOnly: true
        value:
          type: string
          description: The Office Location name
    team_inbox_member:
      type: object
      properties:
        team_inbox_uid:
          type: string
          readOnly: true
          description: The UID of the Team Inbox linked to this membership
        user_uid:
          type: string
          readOnly: true
          description: The UID of the user who is a member of this Team Inbox
        excluded_from_distribution:
          type: boolean
          readOnly: true
          description: >-
            Whether this member is excluded from the automatic Request
            distribution of the Team Inbox
        business_calendar_uid:
          type: string
          readOnly: true
          nullable: true
          description: >-
            The UID of the Business Calendar driving this member availability.
            Only returned when the company has availabilities enabled
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````