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

# addCompanyBankAccount

> The `addCompanyBankAccount` API adds bank account details for a company to process payroll.

### What it does:
- Adds company bank account information including account number, routing number, and bank name
- Sets up the funding source for payroll processing and payments

### Note:
- Account type is limited to **savings** or **checking**
- This endpoint can also be used to update a company's linked account after using `deactivateCompanyBankAccount` on the existing entity.

### Account Linking with Plaid
- Use the `linkType` field to determine the linking method for the account. Supported options are **Manual**, **Plaid** and **CustomProvider**. If not included, linkType defaults to Manual
- If `linkType` is **Plaid**, you must choose between sending the link via email or returning the link via API to surface in your UI using the `plaidOptions` field. Account details are not required.
- The invite email will be sent to the payrollAdmin. If you wish to send the invite to a different email address, please specify with 'email'
- The intiital valid link will be re-used for subsequent 'addCompanyBankAccount' calls

⚠️ Warning: Plaid links have an expiry and should be completed as soon as possible. Default expiry is 72 hours. 



## OpenAPI

````yaml post /adminPortal/addCompanyBankAccount
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /adminPortal/addCompanyBankAccount:
    post:
      tags: []
      summary: addCompanyBankAccount
      description: >-
        The `addCompanyBankAccount` API adds bank account details for a company
        to process payroll.


        ### What it does:

        - Adds company bank account information including account number,
        routing number, and bank name

        - Sets up the funding source for payroll processing and payments


        ### Note:

        - Account type is limited to **savings** or **checking**

        - This endpoint can also be used to update a company's linked account
        after using `deactivateCompanyBankAccount` on the existing entity.


        ### Account Linking with Plaid

        - Use the `linkType` field to determine the linking method for the
        account. Supported options are **Manual**, **Plaid** and
        **CustomProvider**. If not included, linkType defaults to Manual

        - If `linkType` is **Plaid**, you must choose between sending the link
        via email or returning the link via API to surface in your UI using the
        `plaidOptions` field. Account details are not required.

        - The invite email will be sent to the payrollAdmin. If you wish to send
        the invite to a different email address, please specify with 'email'

        - The intiital valid link will be re-used for subsequent
        'addCompanyBankAccount' calls


        ⚠️ Warning: Plaid links have an expiry and should be completed as soon
        as possible. Default expiry is 72 hours. 
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: addCompanyBankAccount
                  example: addCompanyBankAccount
                linkType:
                  type: string
                  enum:
                    - Plaid
                    - CustomProvider
                    - Manual
                  description: 'Default: Manual'
                plaidOptions:
                  type: string
                  description: 'Required if linkType: plaid'
                  enum:
                    - generateURL
                    - sendInviteByEmail
                companyFundingSourceEntity:
                  type: object
                  properties:
                    companyId:
                      type: string
                      format: uuid
                    accountNumber:
                      type: string
                      maxLength: 40
                      description: Not required for Plaid
                    routingNumber:
                      type: string
                      maxLength: 40
                      description: Not required for Plaid
                    bankName:
                      type: string
                      maxLength: 40
                      description: Not required for Plaid
                    accountType:
                      type: string
                      maxLength: 40
                      enum:
                        - savings
                        - checking
                      description: Not required for Plaid
                    accountName:
                      type: string
                      description: Not required for Plaid
                  required:
                    - companyId
              required:
                - method
                - companyFundingSourceEntity
            examples:
              '1':
                value:
                  method: addCompanyBankAccount
                  companyFundingSourceEntity:
                    companyId: 8A9B7683-8E02-494D-8422-963FD05EE785
                    accountNumber: '9889890989'
                    routingNumber: '221982389'
                    bankName: Chase Bank
                    accountType: savings
                    accountName: default
                summary: Manual
              '2':
                value:
                  method: addCompanyBankAccount
                  linkType: Plaid
                  plaidOptions: sendInviteByEmail
                  email: test@mailsac.com
                  companyFundingSourceEntity:
                    companyId: 03B5FD90-4A91-46D8-A892-CFB8F52A8E67
                summary: Plaid Email Example
              '3':
                value:
                  method: addCompanyBankAccount
                  linkType: Plaid
                  plaidOptions: generateURL
                  companyFundingSourceEntity:
                    companyId: 03B5FD90-4A91-46D8-A892-CFB8F52A8E67
                summary: Plaid URL Link Example
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  companyFundingSourceEntity:
                    type: object
                    properties:
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - status
                      - message
                  message:
                    type: string
                  invitesentto:
                    type: string
                  plaidLinkURL:
                    type: string
                  expirationDate:
                    type: string
              examples:
                '1':
                  summary: Success
                  value:
                    companyFundingSourceEntity:
                      status: pending
                      message: The Company's bank account has been added successfully.
                '2':
                  summary: Plaid - URL Link
                  value:
                    message: >-
                      Bank Linking is in progress. The company will be updated
                      once the linking is completed.
                    plaidLinkURL: >-
                      https://secure.plaid.com/hl/lsqr1nnr54r9so9751n0rn0o625q7p5r10
                    expirationDate: '2026-06-15T15:06:27.902391Z'
                '3':
                  summary: Plaid - Email
                  value:
                    message: >-
                      Bank Linking is in progress , payPercentage will be
                      updated , once the linking is completed.
                    invitesentto: testPlaid@mailsac.com
                    plaidLinkURL: >-
                      https://secure.plaid.com/hl/lsqr1nnr54r9so9751n0rn0o625q7p5r10
                    expirationDate: '2026-06-15T15:06:27.807Z'
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: integer
                      message:
                        type: string
                    required:
                      - code
                required:
                  - error
              example:
                error:
                  code: 400
                  message: Invalid CompanyId
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````