> ## Documentation Index
> Fetch the complete documentation index at: https://developer.rollfi.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# updatePaySchedule

> The `updatePaySchedule` endpoint allows updates to the payment mode for an active pay schedule, without having to deactivate and add a new one.

### Notes:
- `paymentMode` is required
- Updates only the payment mode (`Automatic` or `Self-Initiated`)



## OpenAPI

````yaml put /payroll/updatePaySchedule
openapi: 3.1.0
info:
  title: Default module
  description: |
    Webhook events emitted when a company's KYB status is created or changes.

    Rollfi sends these requests to the webhook URL configured for the client.
    Consumers should return a successful 2xx response after accepting the event.
  version: 1.0.0
servers: []
security: []
tags:
  - name: Admin Portal
  - name: Pay Schedule Webhooks
  - name: Pay Period Webhooks
  - name: Employee Bank Account Webhooks
  - name: Employee KYC Webhooks
  - name: Company Bank Account Webhooks
  - name: Company Webhooks
  - name: Employee Status Webhooks
paths:
  /payroll/updatePaySchedule:
    put:
      tags: []
      summary: updatePaySchedule
      description: >-
        The `updatePaySchedule` endpoint allows updates to the payment mode for
        an active pay schedule, without having to deactivate and add a new one.


        ### Notes:

        - `paymentMode` is required

        - Updates only the payment mode (`Automatic` or `Self-Initiated`)
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: updatePaySchedule
                paySchedule:
                  type: object
                  properties:
                    payScheduleId:
                      type: string
                      format: uuid
                      description: Preferred lookup key
                    paymentMode:
                      type: string
                      title: Enum
                      enum:
                        - Automatic
                        - Self-Initiated
                  required:
                    - paymentMode
              required:
                - method
                - paySchedule
            examples:
              '1':
                value:
                  method: updatePaySchedule
                  paySchedule:
                    payScheduleId: 8457D59C-20B9-4B01-8B2F-7BD60C700DEB
                    paymentMode: Automatic
                summary: Update by payScheduleId
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  message:
                    type: string
                required:
                  - status
                  - message
              examples:
                '1':
                  summary: Success
                  value:
                    status: Success
                    message: The payment mode has been updated successfully.
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                    required:
                      - code
                      - message
                required:
                  - error
              examples:
                '1':
                  summary: Invalid payment mode
                  value:
                    error:
                      code: 400
                      message: Invalid payment mode
                '2':
                  summary: No active schedule for company + workerType
                  value:
                    error:
                      code: 400
                      message: >-
                        No active pay schedule found for the given company and
                        worker type
                '3':
                  summary: Invalid company
                  value:
                    error:
                      code: 400
                      message: Invalid company ID. Company does not exist.
          headers: {}
      deprecated: false
      security: []

````