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

# Create Payroll From Validated Data

> Creates or updates a token payroll with contributors from reviewed upload data, resolving pay dates from settings.

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

## OpenAPI

````yaml api-reference/openapi.json POST /stablecoin-payroll/create-payroll-from-validated-data
openapi: 3.1.0
info:
  title: Toku API
  version: 1.0.0
servers:
  - url: https://api.toku.com
security:
  - bearerAuth: []
paths:
  /stablecoin-payroll/create-payroll-from-validated-data:
    post:
      operationId: createPayrollFromValidatedData
      summary: Create Payroll From Validated Data
      description: >-
        Creates or updates a token payroll with contributors from reviewed
        upload data, resolving pay dates from settings.


        Not available to API keys yet. It will need `payroll:write`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreatePayrollFromValidatedDataRequest'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreatePayrollFromValidatedDataResponse'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: Not found
        '409':
          description: Conflict
        '429':
          description: Response 429
components:
  schemas:
    CreatePayrollFromValidatedDataRequest:
      type: object
      properties:
        tokenPayrollId:
          type: string
        validatedEmployees:
          type: array
          items:
            type: object
            properties:
              employeeName:
                type: string
              employeeId:
                type: string
              employeeEmail:
                type: string
              grossCompensation:
                type: number
              totalDeductions:
                type: number
              netPay:
                type: number
              positionID:
                type: string
              confidence:
                type: number
              currency:
                type: string
              tokenTypeID:
                type: string
            required:
              - employeeName
              - grossCompensation
              - totalDeductions
              - netPay
        payrollMetadata:
          type: object
          properties:
            payrollName:
              type: string
            payrollId:
              type: string
            payrollCycle:
              type: string
            approvalCutOffDate:
              type: string
            payPeriodStart:
              type: string
            payPeriodEnd:
              type: string
            payDate:
              type: string
            payDateManuallySet:
              type: boolean
            currency:
              type: string
            totalEmployees:
              type: number
            payrollEntity:
              type: object
              properties:
                name:
                  type: string
                country:
                  type: string
                taxCurrencyCode:
                  type: string
            payrollType:
              type: string
          required:
            - payrollId
            - payrollCycle
          description: >-
            NOTE(ck): a .superRefine() rule is not mirrored here; TGA still
            enforces it
        selectedTokenTypeID:
          type: string
      required:
        - validatedEmployees
        - payrollMetadata
    CreatePayrollFromValidatedDataResponse:
      type: object
      properties:
        success:
          type: boolean
        payrollId:
          type: string
        message:
          type: string
        errors:
          type: array
          items:
            type: string
      required:
        - success
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
````
