You are viewing documentation for the development version, it may be incomplete.
Join our translation project and help translate Zabbix documentation into your native language.



object user.create(object/array users)

This method allows to create new users.

This method is only available to Super admin user type. Permissions to call the method can be revoked in user role settings. See User roles for more information.

The strength of user password is validated according the password policy rules defined by Authentication API. See Authentication API for more information.


(object/array) Users to create.

Additionally to the standard user properties, the method accepts the following parameters.

Parameter Type Description
usrgrps array User groups to add the user to.

The user groups must have only the usrgrpid property defined.
medias array User media to be created.

Return values

(object) Returns an object containing the IDs of the created users under the userids property. The order of the returned IDs matches the order of the passed users.


Creating a user

Create a new user, add him to a user group and create a new media for him.


           "jsonrpc": "2.0",
           "method": "user.create",
           "params": {
               "username": "John",
               "passwd": "Doe123",
               "roleid": "5",
               "usrgrps": [
                       "usrgrpid": "7"
               "medias": [
                       "mediatypeid": "1",
                       "sendto": [
                           "[email protected]"
                       "active": 0,
                       "severity": 63,
                       "period": "1-7,00:00-24:00"
           "id": 1


           "jsonrpc": "2.0",
           "result": {
               "userids": [
           "id": 1

See also


CUser::create() in ui/include/classes/api/services/CUser.php.