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

# Set Hris Direct Reports

> Adds or removes up to 50 direct reports for a manager as auto-approved change requests in one serializable transaction.

Not available to API keys yet. It will need `people:write`.

## OpenAPI

````yaml api-reference/openapi.json POST /hris/set-hris-direct-reports
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/set-hris-direct-reports:
    post:
      operationId: setHrisDirectReports
      summary: Set Hris Direct Reports
      description: >-
        Adds or removes up to 50 direct reports for a manager as auto-approved
        change requests in one serializable transaction.


        Not available to API keys yet. It will need `people:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetHrisDirectReportsRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetHrisDirectReportsResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    SetHrisDirectReportsRequest:
      type: object
      properties:
        managerRoleInOrgID:
          type: string
          format: uuid
        addRoleInOrgIDs:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            NOTE(ck): default `[]` is not expressible here, so this field is
            optional; TGA applies the default
        removeRoleInOrgIDs:
          type: array
          items:
            type: string
            format: uuid
          description: >-
            NOTE(ck): default `[]` is not expressible here, so this field is
            optional; TGA applies the default
        effectiveDate:
          type:
            - string
            - 'null'
          description: >-
            NOTE(ck): a .refine() rule is not mirrored here; TGA still enforces
            it
      required:
        - managerRoleInOrgID
    SetHrisDirectReportsResponse:
      type: object
      properties:
        managerRoleInOrgID:
          type: string
        applied:
          type: array
          items:
            type: object
            properties:
              roleInOrgID:
                type: string
              action:
                type: string
                enum:
                  - ADDED
                  - REMOVED
              changeRequestId:
                type: string
            required:
              - roleInOrgID
              - action
              - changeRequestId
        skipped:
          type: array
          items:
            type: object
            properties:
              roleInOrgID:
                type: string
              reason:
                type: string
                enum:
                  - NOT_FOUND
                  - NO_EMPLOYEE_PROFILE
                  - INACTIVE
                  - SELF
                  - ALREADY_DIRECT_REPORT
                  - WOULD_CREATE_CYCLE
                  - NOT_A_DIRECT_REPORT
            required:
              - roleInOrgID
              - reason
      required:
        - managerRoleInOrgID
        - applied
        - skipped
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
