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

# Update Token Payroll Type

> Changes a token payroll's type and selected token when no settlements exist and it is not approved or completed.

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

## OpenAPI

````yaml api-reference/openapi.json POST /stablecoin-payroll/update-token-payroll-type
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /stablecoin-payroll/update-token-payroll-type:
    post:
      operationId: updateTokenPayrollType
      summary: Update Token Payroll Type
      description: >-
        Changes a token payroll's type and selected token when no settlements
        exist and it is not approved or completed.


        Not available to API keys yet. It will need `payroll:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateTokenPayrollTypeRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateTokenPayrollTypeResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    UpdateTokenPayrollTypeRequest:
      type: object
      properties:
        tokenPayrollId:
          type: string
          minLength: 1
          maxLength: 200
        type:
          type: string
          enum:
            - ON_CYCLE
            - OFF_CYCLE
            - INVOICE_PAYMENT
        selectedTokenTypeID:
          type: string
          minLength: 1
          maxLength: 200
      required:
        - tokenPayrollId
        - type
    UpdateTokenPayrollTypeResponse:
      type: object
      properties:
        tokenPayroll:
          type: object
          properties:
            tokenPayrollID:
              type: string
            orgID:
              type: string
            payPeriodStart:
              type: string
            payPeriodEnd:
              type: string
            payDate:
              type: string
            externalPayrollID:
              type:
                - string
                - 'null'
            fiatCurrency:
              type: string
            payrollEntityId:
              type:
                - string
                - 'null'
            state:
              type: string
            type:
              type: string
            createdAt:
              type: string
            updatedAt:
              type: string
          required:
            - tokenPayrollID
            - orgID
            - payPeriodStart
            - payPeriodEnd
            - payDate
            - externalPayrollID
            - fiatCurrency
            - payrollEntityId
            - state
            - type
            - createdAt
            - updatedAt
        validationErrors:
          type: array
          items:
            type: string
      required:
        - tokenPayroll
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
