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

# Revoke roles

> Revokes role access, or narrows its team scope (see "team_ids"). Only resources whose kind supports roles (employees and integrations) can have one revoked. The role that defines the kind of a resource can only have its teams revoked, never the role itself. Revoking a role, or a team, that such a resource does not have changes nothing.

<Note>Latest stable version</Note>


## OpenAPI

````yaml 26.06.25 post /api/directory/resources.revoke-roles
openapi: 3.1.0
info:
  title: tipee
  version: 26.06.25
servers: []
security:
  - basicAuth: []
tags:
  - name: Activity
    description: Activity
  - name: Balances
    description: Balances
  - name: Directory
    description: Directory
  - name: Schedule
    description: Schedule
  - name: Timeclock
    description: Timeclock
paths:
  /api/directory/resources.revoke-roles:
    post:
      tags:
        - Directory
      summary: Revoke roles
      description: >-
        Revokes role access, or narrows its team scope (see "team_ids"). Only
        resources whose kind supports roles (employees and integrations) can
        have one revoked. The role that defines the kind of a resource can only
        have its teams revoked, never the role itself. Revoking a role, or a
        team, that such a resource does not have changes nothing.
      operationId: post_app_ui_api_directory_directorycommand_revokeresourcesroles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevokeResourcesRolesCommand'
      responses:
        '204':
          description: Resource roles revoked.
components:
  schemas:
    RevokeResourcesRolesCommand:
      required:
        - resource_ids
        - role_ids
      properties:
        resource_ids:
          type: array
          items:
            $ref: '#/components/schemas/Snowflake'
        role_ids:
          type: array
          items:
            $ref: '#/components/schemas/Snowflake'
        team_ids:
          $ref: '#/components/schemas/TeamList'
          description: >-
            Teams to revoke from the role. Omitting it removes the role from the
            resources entirely. Sending "*" revokes every team and keeps the
            role assigned on no team, as does revoking its last remaining teams.
            Revoking specific teams from a role held on "*" turns it into the
            explicit list of the remaining enabled teams, which no longer
            follows the teams created afterwards. An empty array is rejected.
      type: object
    Snowflake:
      type: string
      format: snowflake
      example: '872815618512410358'
    TeamList:
      oneOf:
        - description: Refers to all teams
          type: string
          example: '*'
          enum:
            - '*'
        - description: Refers to a list of teams
          type: array
          items:
            $ref: '#/components/schemas/Snowflake'
          example:
            - '903956503593387633'
            - '903956503593534034'

````