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

# Attempt Kota Auto Enrollment

> Re-runs Kota auto-enrollment for one employee: checks eligibility, enrolls via Kota API, records INELIGIBLE/FAILED outcomes.

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

## OpenAPI

````yaml api-reference/openapi.json POST /hris/attempt-kota-auto-enrollment
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/attempt-kota-auto-enrollment:
    post:
      operationId: attemptKotaAutoEnrollment
      summary: Attempt Kota Auto Enrollment
      description: >-
        Re-runs Kota auto-enrollment for one employee: checks eligibility,
        enrolls via Kota API, records INELIGIBLE/FAILED outcomes.


        Not available to API keys yet. It will need `documents:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AttemptKotaAutoEnrollmentRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttemptKotaAutoEnrollmentResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    AttemptKotaAutoEnrollmentRequest:
      type: object
      properties:
        employeeID:
          type: integer
          minimum: 1
      required:
        - employeeID
    AttemptKotaAutoEnrollmentResponse:
      type: object
      properties:
        success:
          type: boolean
        enrolled:
          type: boolean
        error:
          type: string
        eligibilityResult:
          type: object
          properties:
            isEligible:
              type: boolean
            reasons:
              type: array
              items:
                type: string
            metadata:
              type: object
              properties:
                workCountry:
                  type: string
                employmentCategory:
                  type: string
                employmentType:
                  type: string
                workScheduleSource:
                  type: string
                  enum:
                    - TGA
                    - LEGACY
                status:
                  type: string
                startDate:
                  type: string
                terminationDate:
                  type: string
                daysUntilStart:
                  type: number
                daysBetweenStartAndTermination:
                  type: number
                hasExistingEnrollment:
                  type: boolean
          required:
            - isEligible
            - reasons
            - metadata
        kotaEmployeeID:
          type: string
      required:
        - success
        - enrolled
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
