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

# Resync Rain User

> Verifies Rain users exist at Rain and recreates orphaned ones, for the caller, one contractor, or the whole org.

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

## OpenAPI

````yaml api-reference/openapi.json POST /hris/resync-rain-user
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/resync-rain-user:
    post:
      operationId: resyncRainUser
      summary: Resync Rain User
      description: >-
        Verifies Rain users exist at Rain and recreates orphaned ones, for the
        caller, one contractor, or the whole org.


        Not available to API keys yet. It will need `cards:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResyncRainUserRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResyncRainUserResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    ResyncRainUserRequest:
      type: object
      properties:
        contractorId:
          type: string
          format: uuid
        orgID:
          type: string
          format: uuid
    ResyncRainUserResponse:
      type: object
      properties:
        results:
          type: array
          items:
            type: object
            properties:
              hrisContractorId:
                type:
                  - string
                  - 'null'
              email:
                type: string
              wasOrphaned:
                type: boolean
              action:
                type: string
                enum:
                  - verified
                  - recreated
                  - failed
                  - skipped
              oldRainUserId:
                type: string
              newRainUserId:
                type: string
              error:
                type: string
              details:
                type: string
            required:
              - hrisContractorId
              - email
              - wasOrphaned
              - action
        summary:
          type: object
          properties:
            total:
              type: number
            verified:
              type: number
            recreated:
              type: number
            failed:
              type: number
            skipped:
              type: number
          required:
            - total
            - verified
            - recreated
            - failed
            - skipped
      required:
        - results
        - summary
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
