Skip to main content

AddSysUser

July 21, 2025

This API can be used to add a system user(s).

The settings can be found on the AhsayCBS web console at:

  • System Settings > Basic > Administrative Access

Starting with AhsayCBS v8.3.4.0 affecting all APIs, if AhsayCBS Administrative Access feature is enabled, users may see the error message:

“Your password has expired and must be changed. Please update in web console or by UpdateSysUser API”

This message may appear if a system user’s password is expired when calling any API except UpdateSysUser.do. AddSysUser.do and UpdateSysUser.do may see error messages regarding password complexity when complexity settings are enabled.

The settings can be found on the AhsayCBS web console at: System Settings > Basic > Administrative Access > Authentication > Password.

URL

https://CBS.EXAMPLE.COM/obs/api/json/AddSysUser.do

Available Since Version: 9.1

Parameters

Key Type Description
SysUser String Username of an AhsayCBS System User with Admin, API or Read-Only API role.
SysPwd String Password matching SysUser.
LoginName String Login name of the system user.
Password String Password in plaintext or hashed password. If passing hashed, include PasswordHashed key. Use ListSystemUsers.do to lookup HashedPwd.
PasswordHashed Boolean

An indicator for account’s input password if hashed or not. Default “false” if NOT in request.

If PasswordHashed is set to false, the Password will be hashed and stored. If set as true, Password will be stores as-is. If PasswordHashed is set to true and not using a hashed password, then users will not be able to login to the system.

Hash Algorithm: Plaintext input > encode Hash algorithm SHA-256 > output Hex bytes > encode Hex-Base64 > Hashed text output

Role String Role of the system account. The value can be set to one of the following: ADMIN, READ_ONLY_ADMIN, RESELLER and API_ONLY.
Hostname String Required if "Role" is set to RESELLER.
IP String

Required if "Role" is set to RESELLER.

The IP address must include the HTTPS connector port, for example: 0.0.0.0:443
IsShowRebrandingPages Boolean Corresponding to the three checkboxes on AhsayCBS UI when edit a sub-admin applies only if “Role” is set to RESELLER.
IsSendConsolidatedReport Boolean Corresponding to the three checkboxes on AhsayCBS UI when edit a sub-admin applies only if “Role” is set to RESELLER.
IsFreeTrialOfferAllowed Boolean True = Allow sub-admin accounts to configure Free Trial options and allow to set users to Trial user type. Corresponding to the three checkboxes on AhsayCBS UI when edit a sub-admin applies only if “Role” is set to RESELLER.
Return Values
Key Type Description
Status String "OK" or "Error"
Message String Error message, it only appears if status displays "Error".
ExptType String The type of exception, will only be displayed if the status is "Error".
Examples

Example 1

INPUT

{
	"SysUser":"sample",
	"SysPwd":"sample",
	"LoginName":"api_user",
	"Password":"qWeRtY123456!@#$%",
	"PasswordHashed":"false",
	"Role":"API_ONLY"
}

OUTPUT 1

{
	"Status":"OK"
}

OUTPUT 2 - If another user with the same user name already exists

{
	"Status":"Error",
	"Message":"Name is already used. Please use another name.",
	"ExptType":"java.lang.Exception"
}

Example 2: INPUT IsSendConsolidatedReport for Role = ADMIN

INPUT

{
	"SysUser":"sample",
	"SysPwd":"sample",
	"LoginName":"AdminTom",
	"Password":"qWeRtY123456!@#$%",
	"Role":"ADMN",
	"IsSendConsolidatedReport":"true"
}

OUTPUT

{
	"Status":"Error",
	"Message":"Update consolidated report setting for ‘Admin’ system user through ‘UpdateServerConfig.do’",
	"ExptType":"java.lang.Exception"
}

Example 3: INPUT IsShowRebrandingPages for Role = ADMIN

INPUT

{
	"SysUser":"sample",
	"SysPwd":"sample",
	"LoginName":"AdminTom",
	"Password":"qWeRtY123456!@#$%",
	"Role":"ADMN",
	"IsShowRebrandingPages":"false"
}

OUTPUT

{
	"Status":"Error",
	"Message":"Invalid parameter IsShowRebrandingPages for ADMIN system user",
	"ExptType":"java.lang.Exception"
}