> ## 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.

# Grant roles

> Grants role access, optionally scoped to teams (additive operation). Only resources whose kind supports roles (employees and integrations) can be granted one.

<Note>Latest stable version</Note>


## OpenAPI

````yaml 26.06.25 post /api/directory/resources.grant-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.grant-roles:
    post:
      tags:
        - Directory
      summary: Grant roles
      description: >-
        Grants role access, optionally scoped to teams (additive operation).
        Only resources whose kind supports roles (employees and integrations)
        can be granted one.
      operationId: post_app_ui_api_directory_directorycommand_grantresourcesroles
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GrantResourcesRolesCommand'
      responses:
        '204':
          description: Resource roles granted.
components:
  schemas:
    GrantResourcesRolesCommand:
      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: >-
            Omitting it, or sending an empty array, grants a bare role (on no
            team) on a new assignment and leaves the teams of an existing one
            untouched. Sending "*" scopes the role to every team, which
            supersedes the teams already granted. A disabled team is rejected:
            it is no target for a role.
      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'

````