User
This API endpoint is only available to group owners. The assignable roles can be obtained using the Role API.
List all users
Get the list of all users that belong to the current user's group.
API Request
Request parameters
| Parameters | Type | Required | Description |
search | string | no | The text used to search users' emails, first names and last names |
orderBy | string | no | The field to order users by. Possible values: createdAt, lastName, firstName. Default: createdAt |
sort | string | no | The order to sort users in. Possible values: asc, desc. Default: desc |
Example request
Example response
Get a single user
Get a user by ID.
API Request
Request parameters
| Parameter | Type | Required | Description |
id | string | yes | The user's ID |
Example response
Create user
API Request
Request parameters
| Parameter | Type | Required | Description |
email | string | yes | The user's email |
firstName | string | yes | The user's first name |
lastName | string | yes | The user's last name |
enabled | boolean | no | Whether the user will be enabled or not. Default: true |
roles | array | no | The roles to assign to the user |
Example request
Example response
Update user
API Request
Request parameters
| Parameter | Type | Required | Description |
email | string | no | The user's new email address |
firstName | string | no | The user's new first name |
lastName | string | no | The user's new last name |
enabled | boolean | no | Whether the user will be enabled or not |
roles | array | no | The new roles to assign to the user |
Example request
Example response
Delete user
API Request
Request parameters
| Parameter | Type | Required | Description |
id | string | yes | The ID of the user to delete |
Response status codes
| Code | Meaning |
204 No Content | The user was deleted successfully |
404 Not Found | A user with the provided ID could not be found |