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

# addUser

> 
Creates a new employee or contractor in the system.

### When to Use
- Onboarding new hires
- Adding contractors to payroll
- Setting up remote workers
### Worker Types
- "W2" - Traditional employees
- "1099" - Independent contractors

### Key Requirements
- For Remote workers: Must include `code` (state code)
- For Office workers: Must include `companyLocationId`



## OpenAPI

````yaml post /adminPortal/addUser
openapi: 3.0.1
info:
  title: Default module
  description: ''
  version: 1.0.0
servers: []
security:
  - basic: []
tags: []
paths:
  /adminPortal/addUser:
    post:
      tags: []
      summary: addUser
      description: |-

        Creates a new employee or contractor in the system.

        ### When to Use
        - Onboarding new hires
        - Adding contractors to payroll
        - Setting up remote workers
        ### Worker Types
        - "W2" - Traditional employees
        - "1099" - Independent contractors

        ### Key Requirements
        - For Remote workers: Must include `code` (state code)
        - For Office workers: Must include `companyLocationId`
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                method:
                  type: string
                  title: addUser
                user:
                  type: object
                  properties:
                    companyId:
                      type: string
                    firstName:
                      type: string
                    middleName:
                      type: string
                    lastName:
                      type: string
                    email:
                      type: string
                    phoneNumber:
                      type: string
                      title: Must be 10 digits
                    dateOfJoin:
                      type: string
                    workerType:
                      type: string
                      title: Enum
                      enum:
                        - W2
                        - 1099-NEC
                    jobTitle:
                      type: string
                    companyLocationCategory:
                      type: string
                    stateCode:
                      type: string
                    companyLocationId:
                      type: string
                      title: Need to be added when CompanyLocationCategory is Office
                  required:
                    - companyId
                    - firstName
                    - lastName
                    - email
                    - phoneNumber
                    - dateOfJoin
                    - workerType
                    - jobTitle
                    - companyLocationCategory
              required:
                - method
                - user
            example:
              method: addUser
              user:
                companyId: 33A04AFB-4317-464A-B1E0-BAB610086174
                firstName: Marcus
                middleName: Austin
                lastName: Steve
                email: mar@sto.com
                phoneNumber: '9889890989'
                dateOfJoin: '2000-01-01'
                workerType: W2
                jobTitle: Manager
                companyLocationCategory: Remote
                stateCode: FL
                companyLocationId: ''
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    type: object
                    properties:
                      userId:
                        type: string
                      status:
                        type: string
                      message:
                        type: string
                    required:
                      - userId
                      - status
                    x--orders:
                      - EmployeeID
                      - Status
                      - Message
                required:
                  - user
                x--orders:
                  - Employee
              examples:
                '1':
                  summary: Success
                  value:
                    user:
                      userId: E7B3731C-20F4-4432-A3BE-DDD83D877EAD
                      status: KYC Pending
                      message: >-
                        Marcus Steve has been successfully added as Employee in
                        Test Ltd.
                '2':
                  summary: Exception
                  value:
                    error:
                      code: 400
                      message: First Name is mandatory and cannot be empty.
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: array
                    items:
                      type: object
                      properties:
                        code:
                          type: integer
                        message:
                          type: string
                      required:
                        - code
                required:
                  - error
          headers: {}
      deprecated: false
      security:
        - basic: []
components:
  securitySchemes:
    basic:
      type: http
      scheme: basic

````