> ## 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 Card Pin

> Sets a 4-digit PIN on a Rain card via encrypted session, only for the worker who holds the card; admins are refused.

Not available to API keys.

## OpenAPI

````yaml api-reference/openapi.json POST /hris/set-card-pin
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /hris/set-card-pin:
    post:
      operationId: setCardPin
      summary: Set Card Pin
      description: >-
        Sets a 4-digit PIN on a Rain card via encrypted session, only for the
        worker who holds the card; admins are refused.


        Not available to API keys.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SetCardPinRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SetCardPinResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    SetCardPinRequest:
      type: object
      properties:
        rainCardId:
          type: string
          format: uuid
        pin:
          type: string
          minLength: 4
          maxLength: 4
          pattern: ^\d+$
        orgID:
          type: string
          format: uuid
      required:
        - rainCardId
        - pin
        - orgID
    SetCardPinResponse:
      type: object
      properties:
        success:
          type: boolean
        message:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
