Users

Use these methods to manage Back Office users and obtain information about them.

GET[host]/api/v2/users

Get a list of users

GET[host]/api/v2/users/{userId}

Get user details

POST[host]/api/v2/users

Create a new user

PUT[host]/api/v2/users/{userId}

PATCH[host]/api/v2/users/{userId}

Update user information

DELETE[host]/api/v2/users/{userId}

Delete a user

Get a list of users

Use this method to obtain information about all or specific users registered in the Back Office.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Query parameters:

The following filter parameters are available for this method:

name

The name of a user to be included in the list.

email

The email of a user to be included in the list.

active

Indicates whether to include in the list only the users with the active profile status:

  • 0 — include users regardless of their profile status

  • 1 — include only the users with the active profile status

Refer to the Query parameters section in the API Overview for details on applying filter parameters.

GET[host]/api/v2/users

curl --location -g --request GET 'https://host.name/api/v2/users?limit=10&offset=0&filter[name]=Mary&filter[email]=foo@bar.com&filter[active]=1' \
--header 'Authorization: Bearer <token>'

Response

A response includes an array of User objects providing information about the Back Office users matching the request parameters.

Get user details

Use this method to obtain detailed information about a specified user.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters:

userId required

The user identifier.

GET[host]/api/v2/users/{userId}

curl --location --request GET 'https://host.name/api/v2/users/1' \
--header 'Authorization: Bearer <token>'

Response

A response includes a User object providing information about the specified user.

Create a new user

Use this method to add a new user to the Back Office.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Body:

You can specify the following parameters for a user profile:

name string required

The user name.

email string required

The user email.

password string required

The user password.

active boolean required

If true, a user profile is active; otherwise, false.

tfa boolean required

If true, two-factor authentication is enabled for a user; otherwise, false.

groups array required

An array of integer values identifying the user groups to which a user is added.

phone string

The user phone number.

ipWhitelist array

An array of string values indicating the user IP addresses included in a safelist.

clientTags array

An array of objects indicating the client tags assigned to a user.

canViewMaskedData boolean

If true, a user is allowed to view sensitive information in the Back Office; otherwise, false.

sendNotify boolean

If true, an email is sent to a specified user email notifying the user that their profile was created in the Back Office; otherwise, false.

POST[host]/api/v2/users

curl --location --request POST 'https://host.name/api/v2/users' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "name": "Mary",
  "email": "email@website.com",
  "password": "MySecret123",
  "active": true,
  "tfa": true,
  "groups": [
    1
  ],
  "phone": "+18043257762",
  "ipWhitelist": [
    "79.24.241.198",
    "20.65.174.119"
  ],
  "clientTags": [
    "my_tag"
  ],
  "canViewMaskedData": true,
  "sendNotify": true
}'

Response

A response includes a User object providing information about the created user profile.

Update user information

Use this method to update a specified user profile.

Note

Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters:

userId required

The user identifier.

Body:

Specify the following parameters for a user profile:

name string

The user name.

email string

The user email address.

password string

The user password.

phone string

The user phone number.

active boolean

If true, a user profile is active; otherwise, false.

tfa boolean

If true, two-factor authentication is enabled for a user; otherwise, false.

ipWhitelist array

An array of string values indicating the user IP addresses included in a safelist.

groups array

An array of integer values identifying the user groups to which a user is added.

clientTags array

An array of objects indicating the client tags assigned to a user.

canViewMaskedData boolean

If true, a user is allowed to view sensitive information in the Back Office; otherwise, false.

sendNotify boolean

If true, an email is sent to a specified user email notifying the user that their profile was created in the Back Office; otherwise, false.

PUT[host]/api/v2/users/{userId}

curl --location --request PUT 'https://host.name/api/v2/users/1' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "name": "Mary",
  "email": "foo@bar.com",
  "password": "MySecret123",
  "phone": "+18043257762",
  "active": true,
  "tfa": true,
  "ipWhitelist": [
    "79.24.241.198",
    "20.65.174.119"
  ],
  "groups": [
    1
  ],
  "clientTags": [
    "my_tag"
  ],
  "canViewMaskedData": true,
  "sendNotify": true
}'

Response

A response includes a User object providing updated information about the user profile.

Delete a user

Use this method to delete a specified user profile.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters:

userId required

The user identifier.

DELETE[host]/api/v2/users/{userId}

curl --location --request DELETE 'https://host.name/api/v2/users/1' \
--header 'Authorization: Bearer <token>'

Response

In case of success, no response body is returned.