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

<Warning>This route is in preview: it may change without notice until it becomes part of a stable version.</Warning>


## OpenAPI

````yaml preview post /api/directory/resources.grant-roles
openapi: 3.1.0
info:
  title: tipee
  version: preview
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.
      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: >-
            If not provided, the role is granted on no team (a bare role
            assignment).
      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'

````