API Documentation

Add User

TOC
1. API Headers
2. Sample Request (Payload)


The Add User API creates a new user in the QEval system. This API is used to onboard users by assigning profile information, role, supervisor, campaign, location, and access permissions.

URL https://{Subdomain}.qevalpro.com/api/ManageUser/AddUser
Method POST
Sub Domains “app” or “ai”

1. API Headers

Every API call must include two-factor authentication by providing the following headers:

Header Type Description
Authorisation String Bearer <Generated_Token> (generated after successful login)
X-API-KEY String

<Your_Unique_API_Key> (generated after successful login)

Note: If unavailable, email Qeval@etechtexas.com.

2. Sample Request (Payload)

</> JSON
{
    "EmpId": "EMP001",
    "UserName": "john.doe",
    "Password": "SecurePass@123",
    "EmpType": "Agent",
    "FirstName": "John",
    "LastName": "Doe",
    "MiddleName": "j",
    "Email": "john.doe@example.com",
    "RoleId": 1,
    "SupervisorId": "SUP001",
    "LocationID": 3,
    "PartnerId": 0,
    "CampaignId": 45,
    "IsAccessLocationBased": false,
    "IsAccessIPBased": false,
    "IsSupervisor": false,
    "IsPartnerAllowed": false
}

Description for Request Parameters

S.No Name Type Description Is Required?
1 EmpId String Unique employee identifier Yes
2 UserName String Username used for login Yes
3 Password String Password for the user account Yes
4 EmpType String Employee type (e.g., Agent, FTE) Yes
5 FirstName String First name of the employee Yes
6 LastName String Last name of the employee Yes
7 MiddleName String Middle name of the employee No
8 Email String Email address of the user Yes
9 RoleId Integer Role assigned to the user Yes
10 SupervisorId String Employee ID of the supervisor Yes
11 LocationID Integer Location assigned to the user Yes
12 PartnerId Integer Partner identifier associated with the user Yes
13 CampaignId Integer Campaign assigned to the user Yes
14 IsAccessLocationBased Boolean (String) Enables location-based access restrictions Yes
15 IsAccessIPBased Boolean (String) Enables IP-based login restrictions Yes
16 IsSupervisor Boolean (String) Indicates whether the user is a supervisor Yes
17 IsPartnerAllowed Boolean (String) Indicates whether partner access is enabled Yes

Validation Rules

Field Validation Rule
EmpId Required, maximum 25 characters, alphanumeric and dot (.) allowed
UserName Required, maximum 512 characters
Password Required, minimum 12 characters, maximum 128 characters
EmpType Required, maximum 25 characters, alphanumeric
FirstName Required, maximum 100 characters
LastName Required, maximum 100 characters
Email Must be a valid email address
IsAccessLocationBased Must be “true” or “false”
IsAccessIPBased Must be “true” or “false”
IsSupervisor Must be “true” or “false”
IsPartnerAllowed Must be “true” or “false”

3. Response Examples

Success 

</> JSON
{
    "Message": "User Added successfully.",
    "Data": {
        "EmpId": "EMP001",
        "EmpSrId": 1023,
        "UserName": "john.doe"
}

Status Codes

Code Status Description
200 Success User added successfully

Response Parameters

S.No Name Type Description
1 Message String Status message returned by the API
2 EmpSrId Integer System-generated employee serial identifier
3 EmpId String Employee identifier
4 UserName String Username created in the system

Failure

</> JSON
Duplicate Employee ID

{
  "Message": "EmpID already exists. Please enter a different EmpID."
}
</> JSON
Duplicate Username

{
  "Message": "Username already exists. Please enter a different Username."
}
</> JSON
Duplicate Email

{
  "Message": "Email already exists. Please enter a different Email."
}
</> JSON
Validation Error

{
  "Message": "The request is invalid."
}

Status Codes

Code Status Description
400 Bad Request Validation failure or duplicate Employee ID, Username, or Email
401 Unauthorised Invalid or expired authentication token
403 Forbidden Invalid or missing API key
406 Not Acceptable Exception occurred while processing the request
500 Internal Server Error Unexpected server error occurred

Notes

  • Authentication is mandatory for accessing this API.
  • Employee ID, Username, and Email must be unique within the system.
  • Password length must be between 12 and 128 characters.
  • Boolean fields must be passed as string values: “true” or “false”.
  • A successful response returns the generated Employee Serial ID (EmpSrId) which can be used for future update and delete operations.
  • Ensure all referenced entities such as Role, Campaign, Supervisor, Location, and Partner exist before creating a user.
  • The API validates all mandatory fields before creating the user record.

    ×

    Contact Us