PARTNERS

createAccount

This method creates a user account with password.

Parameters

Parameter

Type

Optional

Description

email

String

No

The email address for the new account.

profile

Object

No

An object containing profile information: fullName, timezone and language. timezone and language are optional.

password

String

Yes

The password for the new account. If this value is omitted a password will be created and sent by email to the user. The password should be at least 6 characters in length and must contain at least one digit, one upper case, one lower case and one special character.

companyId

String

Yes

The company ID used for linking the user account to a specific company. If not specified, the account will be linked to the company that holds the API key.

role

Number

Yes

The role of the new account. The default value is 1 - Company Administrator. These are the available roles:

  • 1 - Company Administrator.

  • 2 - Network Administrator.

  • 3 - Reporter.

  • 4 - Partner.

  • 5 - Custom. For this role, rights must be specified.

rights

Object

Yes

An object containing the rights of a user account. This object should be set only when role parameter has the value 5 - Custom. When set for other roles, the values will be ignored and replaced with the rights specific to that role. The available rights are:

  • manageCompanies

  • manageNetworks Setting this to true implies manageReports right to true

  • manageUsers

  • manageReports

  • companyManager

Each option has two possible values: true, where the user is granted the right, or false otherwise. Omitted values from the request are automatically set to false.

targetIds

Array

Yes

A list of IDs representing the targets to be managed by the user account.

Return value

This method returns a String: The ID of the created user account.

Example

Request

 {
       "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
       "jsonrpc": "2.0",
       "method": "createAccount",
       "params": {
           "email": "client@bitdefender.com",
           
           "profile": {
               "fullName": "Bitdefender User",
               "language": "en_US",
               "timezone": "Europe/Bucharest"
           },
           "password": "P@s4w0rd",
           "role": 5,
           "rights": {
               "manageNetworks": true,
               "manageReports": true,
               "manageUsers": false
           },
           "companyId": "58541613aaed7090058b4567",
           "targetIds": [
               "585d2dc9aaed70820e8b45b4",
               "585d2dd5aaed70b8048b45ca"
           ]
       }

Response

  {
   "id": "787b5e36-89a8-4353-88b9-6b7a32e9c87f",
   "jsonrpc": "2.0",
   "result": "585d2dc9aaed70820abc45b4"
   }