User Model

The Staffbase User Model

User Model

Whenever you get in touch with users in our API the data you get or need to send with are modelled following this user model. Please be aware of that all optional properties can be null. Properties that are marked as read-only cannot be changed when using our API directly.

Properties

nametypedescription
idobjectId read-onlyThe internal id of the user. The system creates this property automatically: it is unique and cannot be changed.
externalIdstring optionalThis id can be set as an external id to identify the user in your organisation. Therefore, this property needs to be unique, too. It is only visible to the admin.
firstNamestringThe first name of the user. This property is a system profile field.
lastNamestringThe last name of the user. This property is a system profile field.
publicEmailAddressstring optionalThis is the email address that should be shown publicly in the user’s profile, not the primary email address used for password recovery and email notifications. This property is a system profile field.
positionstring optionalThe position the user has in the company. This property is a system profile field.
departmentstring optionalThe department the user belongs to. This property is a system profile field.
locationstring optionalThe location the user works at. This property is a system profile field.
phoneNumberstring optionalThe users phone number. This is the phone number that should be shown publicly in the user's profile. This property is a system profile field.
statusstring read-onlyThe status of a user could be activated, pending, or deactivated. The status activated belongs to a user who has signed up successfully and can login. The status pending belongs to a user who has been invited recently to the organisation but has not signed up yet. The status deactivated belongs to a user who should not be able to login anymore.
rolerole typeDefines the role a user can have. Check out the Role Type model for more information.
createdtimestamp read-onlyThe timestamp for the date the user was created.
updatedtimestamp read-onlyThe timestamp for the most recent date the user has been updated.
{{Custom Field Identifier}}string optionalThis property is a custom profile field.

Example

This is an example JSON response for retrieving (GET) an individual Staffbase user.

1{
2 "activated": "2020-04-20T07:15:15.073Z",
3 "config": {
4 "locale": "en_US"
5 },
6 "created": "2020-04-20T07:15:15.073Z",
7 "id": "5791e3ffd4c61f21c3df8b90",
8 "externalID": "jd123",
9 "firstName": "John",
10 "groupIDs": [
11 "{{value}}"
12 ],
13 "lastName": "Doe",
14 "publicEmailAddress": "john@doe.com",
15 "position": "Developer",
16 "department": "Development & Research",
17 "location": "Chemnitz",
18 "mandatoryGroupIDs": null,
19 "phoneNumber": "+491234567890",
20 "status": "activated",
21 "tags": [
22 "profile:{{customField1ID}}:{{value}}",
23 "profile:{{customField2ID}}:{{value}}"
24 ],
25 "role": {
26 "type": "admin"
27 },
28 "profile": {
29 "{{customField1}}": "{{value}}",
30 "{{customField2}}": "{{value}}",
31 "{{customField3}}": "{{value}}"
32 },
33 "created": "2016-07-22T09:14:39.146Z",
34 "updated": "2016-08-16T15:15:45.668Z"
35}