Skip to main content

Users Data Model

COTUser

Description

A user represents a person or bot that can perform actions within a company's Cotalker environment and execute client-side actions such as sending messages and accessing channels. Their access roles will determine which (administrative) endpoint they may use.

Sample JSON

{
"_id": "611421cd644dce40703f02e5",
"name": {
"displayName": "",
"names": "Jane",
"lastName": "Doe",
"secondLastName": ""
},
"properties": [
"611a7d2f174df70491261623",
"611a7d54f13f3d03e631f990"
],
"accessRoles": [
"611421cd644dce40703f02e5",
"611421e627bec7f78be84cb0",
"611421ef613b523cb41fbf28"
],
"isActive": true,
"termsConditions": true,
"search": [
"jane",
"doe",
"tester",
"company",
"com",
"janecompanycom"
],
"isOnline": false,
"avatar": {
"small": "https://cotalker-us-files.s3.amazonaws.com/certificationworld/image/v4_611421cd644dce40703f02e5/small/profile-jane-doe.jpeg",
"square": "https://cotalker-us-files.s3.amazonaws.com/certificationworld/image/v4_611421cd644dce40703f02e5/square/profile-jane-doe.jpeg",
"original": "https://cotalker-us-files.s3.amazonaws.com/certificationworld/image/v4_611421cd644dce40703f02e5/original/profile-jane-doe.jpeg"
},
"companies": [
{
"hierarchy": {
"boss": ["611a9211cb6c51cec3ebf018"],
"peers": ["611a92411d1ecb35d8c21fbc", "611a9251de115d3d72041b24"],
"subordinate": ["611a92639477c85297135de6", "611a92738822372137e26c70"]
},
"_id": "611422012f7c43ed7097a2d8",
"companyId": "6114220950eea66250fb3727"
}
],
"email": "jane@company.com",
"jobTitle": "technical writer",
"settings": {
"hideSummary": false,
"hideContacts": false
},
"phone": "2018653676",
"lastRequestDate": "2021-06-12T10:19:41.707Z",
"createdAt": "2021-06-12T10:19:41.707Z",
"modifiedAt": "2021-07-30T15:05:28.900Z",
"job": "61142214ca7cd07784e262c1",
"extensions": {
"birthdays_00": {
"birthdate_00": "1985-06-01T04:00:00.000Z"
}
},
"permissionsV2": [
"admin-groups-write",
"admin-channels-write",
"admin-bots-write",
"admin-properties-write",
"admin-access"
]
}

Fields

FieldDescriptionTypeNote
_idThe user's ID numberObjectId<COTUser>
accessRolesThe access roles the user has been designatedObjectID<COTAccessRole>[ ]Access Roles Model
avatarUser's profile pictureobject
avatar.smallSmall profile picturestringURL
avatar.squareSquare profile picturestringURL
avatar.originalOriginal profile picturestringURL
companiesCompany Cotalker workspaces the user belongs toobject[ ]
companies[index].hierarchyobject
companies[index].hierarchy.bossThe ID number of the user's bossObjectId<COTUser>[ ]
companies[index].hierarchy.peersThe ID number of the user's peersObjectId<COTUser>[ ]
companies[index].hierarchy.subordinateThe ID number of the user's subordinatesObjectId<COTUser>[ ]
companies[index]._idInternal system ID.ObjectIdIgnore this field.
companies[index].companyIdThe company's ID numberObjectId<COTCompany>Company Model
createdAtThe date the user was createdISODateYYYY-MM-DDTHH:mm:ss.SSSZ
emailThe user's email.stringThe email cannot be changed.
extensionsCollections used to store user informationobjectAdditional fields
isActiveIndicates if the user is still active or if it has been deactivated boolean
isOnlineboolean
isReadOnlySets the user to read-only mode.boolean
jobObjectId of the job title assigned to the userObjectId<COTJobTitles>Job Title Data Model
jobTitleThe user's job titlestring
lastRequestDateISODateYYYY-MM-DDTHH:mm:ss.SSSZ
modifiedAtLast time the user's data was modifiedISODateYYYY-MM-DDTHH:mm:ss.SSSZ
nameUser's full nameobject
name.displayNamestring
name.namesUser's first and second namesstring
name.lastNameUser's surnamestring
name.secondLastNameUser's second surnamestring
passwordIndicates the user's login passwordstring
passwordModifiedAtIndicates the time and date the user's password was last modified.ISODateUsed for password rotation if activated.
permissionsV2Permissions the user has been grantedstring[ ]List of default permissions
phoneThe user's registered phone numberstring
propertiesProperties (elements) assigned to the userObjectID<COTProperty>[ ]Property(Elements) Model
searchSearch engine keywords to let other users locate themstring[ ]Automatically created
settingsobject
settings.hideSummaryboolean
settings.hideContactsboolean
termsConditionsDisplays the company's terms of conditions to new usersboolean

Deprecated Fields

The following deprecated items might still be found in the model:

FieldDescriptionTypeNote
badgestring[ ]DEPRECATED
devicesThe devices or platforms the user has installed DevicesModelDEPRECATED
emailIsVerifiedbooleanDEPRECATED
extraAdditional attributes; Additional fields (user.extensions) takes its placeobjectDEPRECATED
hierarchyLevelstringDEPRECATED
isPhoneVerifiedbooleanDEPRECATED
messagesUnreadstring[ ]DEPRECATED
needPasswordChangebooleanDEPRECATED
notificationsNotification optionsNotificationModelDEPRECATED
notifications.generalOptions: all, none, workstringDEPRECATED
notifications.turnOffGroupstrings[ ]DEPRECATED
notifications.turnOffChannelstrings[ ]DEPRECATED
notifications.workUser's workhours during the weekUserWorkModel[ ]DEPRECATED
notifications.work[index].dayIndicates the workday mon, tue, wed, thu, fri, sat, sunstringDEPRECATED
notifications.work[index].activeIndicates if the user works on this daybooleanDEPRECATED
notifications.work[index].startIndicates the hour the user begins their workdaystring (HH:MM)DEPRECATED
notifications.work[index].endIndicates the hour the user ends their workdaystring (HH:MM DEPRECATED
permissionsstring[ ]DEPRECATED
profileInfoProfileSettingsModelDEPRECATED
providerstringDEPRECATED
requiredChangesstring[ ]DEPRECATED
roleOptions: user, admin, superstringDEPRECATED
taskManagerbooleanDEPRECATED

Additional Resources

Help