Create New User

Endpoint: POST /users

Description: Creates a new user with the provided details.

Request Body:

first_name
required
stringThe first name of the user.
last_name
required
stringThe last name of the user.
email
required
stringThe email address of the user.
password
required
stringThe password for the user account. Must be at least 6 characters long and include one lowercase letter, one uppercase letter, one number, and one special character.
phone
optional
stringThe phone number of the user.
company_employee_id
optional
stringThe company-specific employee ID.
employee_code
optional
stringThe kiosk employee code which should be only 4 digits long.
role_id
optional
integerThe role of the user (1 for Admin, 2 for Manager, 3 for Employee; default is 3).
track_location
optional
booleanIndicates if location tracking is enabled (default is false).
track_mileage
optional
booleanIndicates if mileage tracking is enabled (default is false).
pay_rate
optional
IntegerThe pay rate for the user (default is 0).
billing_rate_type
optional
IntegerThe billing rate type (0 for hourly, 1 for daily; default is 0)

Request Body Sample:

{
    "first_name": "Joe", // required
    "last_name": "Doe", // required
    "email": "", // required
    "phone": "03237824623", // optional
    "password": "Password@123", // required 
    "company_employee_id": "674343", // optional
    "employee_code": "", // optional: Kiosk Employee Code
    "role_id": 2, // optional 1 - admin, 2- manager, 3 - employee, default is 3
    "track_location": true, // optional boolean default false
    "track_mileage": true, // optional boolean default false
    "pay_rate": 10, // optional default 0
    "billing_rate_type": 0, // optional default 0 - hourly, 1 - daily
    "timesheet_option": true,
    "schedule_option": true,
    "job_option": true,
    "report_option": true,
    "whoworking_option": true
}

Language
URL
Click Try It! to start a request and see the response here!