User
User
Users are all your team members that need access to Planhat. Users can be created in the app, using spreadsheet upload or over API.
If a user is flagged as inactive, they will not be able to login to Planhat and they will not get notifications, but they will be available for assigning accounts etc.
Property | Required | Type | Description |
|---|---|---|---|
_id | objectId | Planhat identifier. | |
Yes | string | Email of the user. | |
nickName | Yes | string | Nickname of user which will be shown in Planhat. |
firstName | Yes | string | First name of user. |
lastName | Yes | string | Last name of user. |
roles | array | Array of role ids assigned to the user. | |
externalId | string | The users' id in your system. | |
inactive | boolean | Sets the user in inactive state. A user set as inactive won't be able to login and won't receive notifications. Default is true. | |
image | object | Object containing the avatar information. (Autogenerated). | |
radarOneLine | boolean | Internal system field. (Autogenerated). | |
taskFilter | object | Object containing the task filter information. (Autogenerated). | |
companyFilter | string | Internal system field. (Autogenerated). | |
compressedView | boolean | Internal system field. (Autogenerated). | |
isHidden | boolean | Defines if the user is hidden within the system. | |
notificationsEnabled | boolean | Defines if the user has notifications enabled. Default is true. | |
createDate | string | ISO date of when the user was created. (Autogenerated). | |
createdAt | string | ISO date of when the user was created. | |
updatedAt | string | ISO date of when the user was last updated. (Autogenerated). | |
permissions | array | Array of user's permissions. (Autogenerated). | |
tzOffset | number | User's timezone offset. | |
managers | array | Array of user's manager(s) id(s). | |
teams | array | Array of user's team(s) id(s). | |
isExposedAsSenderOption | boolean | Sets user as option for email sender. | |
custom | object | A flexible object with custom data. |
Users are all your team members that need access to Planhat. Users can be created in the app, using spreadsheet upload or over API.
If a user is flagged as inactive, they will not be able to login to Planhat and they will not get notifications, but they will be available for assigning accounts etc.
Property | Required | Type | Description |
|---|---|---|---|
_id | objectId | Planhat identifier. | |
Yes | string | Email of the user. | |
nickName | Yes | string | Nickname of user which will be shown in Planhat. |
firstName | Yes | string | First name of user. |
lastName | Yes | string | Last name of user. |
roles | array | Array of role ids assigned to the user. | |
externalId | string | The users' id in your system. | |
inactive | boolean | Sets the user in inactive state. A user set as inactive won't be able to login and won't receive notifications. Default is true. | |
image | object | Object containing the avatar information. (Autogenerated). | |
radarOneLine | boolean | Internal system field. (Autogenerated). | |
taskFilter | object | Object containing the task filter information. (Autogenerated). | |
companyFilter | string | Internal system field. (Autogenerated). | |
compressedView | boolean | Internal system field. (Autogenerated). | |
isHidden | boolean | Defines if the user is hidden within the system. | |
notificationsEnabled | boolean | Defines if the user has notifications enabled. Default is true. | |
createDate | string | ISO date of when the user was created. (Autogenerated). | |
createdAt | string | ISO date of when the user was created. | |
updatedAt | string | ISO date of when the user was last updated. (Autogenerated). | |
permissions | array | Array of user's permissions. (Autogenerated). | |
tzOffset | number | User's timezone offset. | |
managers | array | Array of user's manager(s) id(s). | |
teams | array | Array of user's team(s) id(s). | |
isExposedAsSenderOption | boolean | Sets user as option for email sender. | |
custom | object | A flexible object with custom data. |
Users are all your team members that need access to Planhat. Users can be created in the app, using spreadsheet upload or over API.
If a user is flagged as inactive, they will not be able to login to Planhat and they will not get notifications, but they will be available for assigning accounts etc.
Property | Required | Type | Description |
|---|---|---|---|
_id | objectId | Planhat identifier. | |
Yes | string | Email of the user. | |
nickName | Yes | string | Nickname of user which will be shown in Planhat. |
firstName | Yes | string | First name of user. |
lastName | Yes | string | Last name of user. |
roles | array | Array of role ids assigned to the user. | |
externalId | string | The users' id in your system. | |
inactive | boolean | Sets the user in inactive state. A user set as inactive won't be able to login and won't receive notifications. Default is true. | |
image | object | Object containing the avatar information. (Autogenerated). | |
radarOneLine | boolean | Internal system field. (Autogenerated). | |
taskFilter | object | Object containing the task filter information. (Autogenerated). | |
companyFilter | string | Internal system field. (Autogenerated). | |
compressedView | boolean | Internal system field. (Autogenerated). | |
isHidden | boolean | Defines if the user is hidden within the system. | |
notificationsEnabled | boolean | Defines if the user has notifications enabled. Default is true. | |
createDate | string | ISO date of when the user was created. (Autogenerated). | |
createdAt | string | ISO date of when the user was created. | |
updatedAt | string | ISO date of when the user was last updated. (Autogenerated). | |
permissions | array | Array of user's permissions. (Autogenerated). | |
tzOffset | number | User's timezone offset. | |
managers | array | Array of user's manager(s) id(s). | |
teams | array | Array of user's team(s) id(s). | |
isExposedAsSenderOption | boolean | Sets user as option for email sender. | |
custom | object | A flexible object with custom data. |
To create a user it's required to define in the payload a nickName, email, firstName, and lastName.
Example Request
curl --location -g --request POST 'https://api.planhat.com/users' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' \ --data-raw '{ "email": "bob@test.com", "firstName": "Bob", "lastName": "Marley", "nickName": "Bob", "roles": [ "57e2b92ff795575a5b8c4659" ] }'
Example Response
200 ok
'{ "skippedGettingStartedSteps": { "email": false, "linkedin": false, "avatar": false, "all": false, "team": false, "customers": false }, "sharedNotificationsPrefs": { "enabled": [], "disabled": [], "disabledEvents": [] }, "image": { "path": "" }, "firstName": "Bob", "lastName": "Marley", "isHidden": false, "removed": false, "inactive": true, "compressedView": false, "companyFilter": "", "taskFilter": "", "workflowFilter": "", "playLogDisabled": true, "radarOneLine": false, "expandedFolders": [], "usageReportColumnsEnabled": [], "companyUsersEnabledColumns": [], "revReportPeriodType": "past x days", "splitLayoutDisabled": false, "dailyDigest": true, "followerUpdate": true, "inAppNotifications": true, "lastVisitedCompanies": [], "lastVisitedEndusers": [], "roles": [ "57e2b92ff795575a5b8c4659" ], "apiTokens": [], "poc": [], "isExposedAsSenderOption": false, "defaultMeetingLength": 60, "collapsedFolders": [], "type": "user", "_id": "61031e2ad414d49dcdb61b22", "email": "bob@test.com", "nickName": "Bob", "createDate": "2021-07-29T21:31:22.042Z", "__v": 0 }'
To create a user it's required to define in the payload a nickName, email, firstName, and lastName.
Example Request
curl --location -g --request POST 'https://api.planhat.com/users' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' \ --data-raw '{ "email": "bob@test.com", "firstName": "Bob", "lastName": "Marley", "nickName": "Bob", "roles": [ "57e2b92ff795575a5b8c4659" ] }'
Example Response
200 ok
'{ "skippedGettingStartedSteps": { "email": false, "linkedin": false, "avatar": false, "all": false, "team": false, "customers": false }, "sharedNotificationsPrefs": { "enabled": [], "disabled": [], "disabledEvents": [] }, "image": { "path": "" }, "firstName": "Bob", "lastName": "Marley", "isHidden": false, "removed": false, "inactive": true, "compressedView": false, "companyFilter": "", "taskFilter": "", "workflowFilter": "", "playLogDisabled": true, "radarOneLine": false, "expandedFolders": [], "usageReportColumnsEnabled": [], "companyUsersEnabledColumns": [], "revReportPeriodType": "past x days", "splitLayoutDisabled": false, "dailyDigest": true, "followerUpdate": true, "inAppNotifications": true, "lastVisitedCompanies": [], "lastVisitedEndusers": [], "roles": [ "57e2b92ff795575a5b8c4659" ], "apiTokens": [], "poc": [], "isExposedAsSenderOption": false, "defaultMeetingLength": 60, "collapsedFolders": [], "type": "user", "_id": "61031e2ad414d49dcdb61b22", "email": "bob@test.com", "nickName": "Bob", "createDate": "2021-07-29T21:31:22.042Z", "__v": 0 }'
To create a user it's required to define in the payload a nickName, email, firstName, and lastName.
Example Request
curl --location -g --request POST 'https://api.planhat.com/users' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' \ --data-raw '{ "email": "bob@test.com", "firstName": "Bob", "lastName": "Marley", "nickName": "Bob", "roles": [ "57e2b92ff795575a5b8c4659" ] }'
Example Response
200 ok
'{ "skippedGettingStartedSteps": { "email": false, "linkedin": false, "avatar": false, "all": false, "team": false, "customers": false }, "sharedNotificationsPrefs": { "enabled": [], "disabled": [], "disabledEvents": [] }, "image": { "path": "" }, "firstName": "Bob", "lastName": "Marley", "isHidden": false, "removed": false, "inactive": true, "compressedView": false, "companyFilter": "", "taskFilter": "", "workflowFilter": "", "playLogDisabled": true, "radarOneLine": false, "expandedFolders": [], "usageReportColumnsEnabled": [], "companyUsersEnabledColumns": [], "revReportPeriodType": "past x days", "splitLayoutDisabled": false, "dailyDigest": true, "followerUpdate": true, "inAppNotifications": true, "lastVisitedCompanies": [], "lastVisitedEndusers": [], "roles": [ "57e2b92ff795575a5b8c4659" ], "apiTokens": [], "poc": [], "isExposedAsSenderOption": false, "defaultMeetingLength": 60, "collapsedFolders": [], "type": "user", "_id": "61031e2ad414d49dcdb61b22", "email": "bob@test.com", "nickName": "Bob", "createDate": "2021-07-29T21:31:22.042Z", "__v": 0 }'
To update a user it's required to pass the user _id in the request URL as a parameter.
Alternately it’s possible to update using the user externalId adding a prefix.
Example:
Example Request
curl --location -g --request PUT 'https://api.planhat.com/users/61031e2ad414d49dcdb61b22' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' \ --data-raw '{ "nickName": "Bob Marley" }'
Example Response
200 ok
'{ "_id": "61031e2ad414d49dcdb61b22", "skippedGettingStartedSteps": { "email": false, "linkedin": false, "avatar": false, "all": false, "team": false, "customers": false }, "sharedNotificationsPrefs": { "enabled": [], "disabled": [], "disabledEvents": [] }, "image": { "path": "" }, "firstName": "Bob", "lastName": "Marley", "isHidden": false, "removed": false, "inactive": true, "compressedView": false, "companyFilter": "", "taskFilter": "", "workflowFilter": "", "playLogDisabled": true, "radarOneLine": false, "expandedFolders": [], "usageReportColumnsEnabled": [], "companyUsersEnabledColumns": [], "revReportPeriodType": "past x days", "splitLayoutDisabled": false, "dailyDigest": true, "followerUpdate": true, "inAppNotifications": true, "lastVisitedCompanies": [], "lastVisitedEndusers": [], "roles": [ "57e2b92ff795575a5b8c4659" ], "poc": [], "isExposedAsSenderOption": false, "defaultMeetingLength": 60, "collapsedFolders": [], "type": "user", "email": "bob@test.com", "nickName": "Bob Marley", "createDate": "2021-07-29T21:31:22.042Z", "__v": 0 }'
To update a user it's required to pass the user _id in the request URL as a parameter.
Alternately it’s possible to update using the user externalId adding a prefix.
Example:
Example Request
curl --location -g --request PUT 'https://api.planhat.com/users/61031e2ad414d49dcdb61b22' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' \ --data-raw '{ "nickName": "Bob Marley" }'
Example Response
200 ok
'{ "_id": "61031e2ad414d49dcdb61b22", "skippedGettingStartedSteps": { "email": false, "linkedin": false, "avatar": false, "all": false, "team": false, "customers": false }, "sharedNotificationsPrefs": { "enabled": [], "disabled": [], "disabledEvents": [] }, "image": { "path": "" }, "firstName": "Bob", "lastName": "Marley", "isHidden": false, "removed": false, "inactive": true, "compressedView": false, "companyFilter": "", "taskFilter": "", "workflowFilter": "", "playLogDisabled": true, "radarOneLine": false, "expandedFolders": [], "usageReportColumnsEnabled": [], "companyUsersEnabledColumns": [], "revReportPeriodType": "past x days", "splitLayoutDisabled": false, "dailyDigest": true, "followerUpdate": true, "inAppNotifications": true, "lastVisitedCompanies": [], "lastVisitedEndusers": [], "roles": [ "57e2b92ff795575a5b8c4659" ], "poc": [], "isExposedAsSenderOption": false, "defaultMeetingLength": 60, "collapsedFolders": [], "type": "user", "email": "bob@test.com", "nickName": "Bob Marley", "createDate": "2021-07-29T21:31:22.042Z", "__v": 0 }'
To update a user it's required to pass the user _id in the request URL as a parameter.
Alternately it’s possible to update using the user externalId adding a prefix.
Example:
Example Request
curl --location -g --request PUT 'https://api.planhat.com/users/61031e2ad414d49dcdb61b22' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' \ --data-raw '{ "nickName": "Bob Marley" }'
Example Response
200 ok
'{ "_id": "61031e2ad414d49dcdb61b22", "skippedGettingStartedSteps": { "email": false, "linkedin": false, "avatar": false, "all": false, "team": false, "customers": false }, "sharedNotificationsPrefs": { "enabled": [], "disabled": [], "disabledEvents": [] }, "image": { "path": "" }, "firstName": "Bob", "lastName": "Marley", "isHidden": false, "removed": false, "inactive": true, "compressedView": false, "companyFilter": "", "taskFilter": "", "workflowFilter": "", "playLogDisabled": true, "radarOneLine": false, "expandedFolders": [], "usageReportColumnsEnabled": [], "companyUsersEnabledColumns": [], "revReportPeriodType": "past x days", "splitLayoutDisabled": false, "dailyDigest": true, "followerUpdate": true, "inAppNotifications": true, "lastVisitedCompanies": [], "lastVisitedEndusers": [], "roles": [ "57e2b92ff795575a5b8c4659" ], "poc": [], "isExposedAsSenderOption": false, "defaultMeetingLength": 60, "collapsedFolders": [], "type": "user", "email": "bob@test.com", "nickName": "Bob Marley", "createDate": "2021-07-29T21:31:22.042Z", "__v": 0 }'
To get a specific user it's required to pass the _id in the request URL as a parameter.
Alternately it's possible to get a user using its externalId adding a prefix.
Example:
Example Request
curl --location -g --request get 'https://api.planhat.com/users/564b063a508f068051ee82a5' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}'
Example Response
200 ok
'{ "_id": "564b063a508f068051ee82a5", "nickName": "Diego Checa", "email": "diego@planhat.com", "image": { "path": "" }, "radarOneLine": false, "taskFilter": "", "compressedView": false, "isHidden": false, "createDate": "2016-02-11T18:07:49.173Z", "lastName": "", "firstName": "Diego", "__v": 13, "dailyDigest": true, "followerUpdate": true, "permissions": { "admin": true, "changeOwner": true, "onlyMyPortfolio": false, "developer": true }, "revReportPeriodType": "past x days", "inAppNotifications": true, "playlistSection": "all", "lastDailyDigest": 18830, "accountAccess": "all accounts", "roles": [ { "_id": "000000010000000000000000", "name": "CSM", "description": "Access to a few selected views and relevant accounts", "__v": 393 }, { "_id": "000000030000000000000000", "name": "Developer", "description": "Access to API keys, error pages etc", "__v": 4 }, { "_id": "000000000000000000000000", "name": "Administrator", "description": "Full access, including ability to edit users and settings", "__v": 55 }, { "_id": "000000020000000000000000", "name": "Manager", "description": "Access to the entire portfolio, and all functionality", "__v": 56 } ], "msApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "playLogDisabled": true, "poc": [ "Agreement" ], "emailSignature": { "content": "<div>hello<br></div>", "enabled": false }, "inactive": false, "removed": false, "tzOffset": -5, "intercomAdminId": "1123812", "custom": {}, "defaultMeetingLength": 60, "isExposedAsSenderOption": false, "splitLayoutDisabled": false, "recentOpenSharedView": "56bccdf554d64d837d01be63", "invoicesSort": "-dueDate", "type": "user", "undefined": null, "googleApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "googleCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} }, "msCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} } }'
To get a specific user it's required to pass the _id in the request URL as a parameter.
Alternately it's possible to get a user using its externalId adding a prefix.
Example:
Example Request
curl --location -g --request get 'https://api.planhat.com/users/564b063a508f068051ee82a5' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}'
Example Response
200 ok
'{ "_id": "564b063a508f068051ee82a5", "nickName": "Diego Checa", "email": "diego@planhat.com", "image": { "path": "" }, "radarOneLine": false, "taskFilter": "", "compressedView": false, "isHidden": false, "createDate": "2016-02-11T18:07:49.173Z", "lastName": "", "firstName": "Diego", "__v": 13, "dailyDigest": true, "followerUpdate": true, "permissions": { "admin": true, "changeOwner": true, "onlyMyPortfolio": false, "developer": true }, "revReportPeriodType": "past x days", "inAppNotifications": true, "playlistSection": "all", "lastDailyDigest": 18830, "accountAccess": "all accounts", "roles": [ { "_id": "000000010000000000000000", "name": "CSM", "description": "Access to a few selected views and relevant accounts", "__v": 393 }, { "_id": "000000030000000000000000", "name": "Developer", "description": "Access to API keys, error pages etc", "__v": 4 }, { "_id": "000000000000000000000000", "name": "Administrator", "description": "Full access, including ability to edit users and settings", "__v": 55 }, { "_id": "000000020000000000000000", "name": "Manager", "description": "Access to the entire portfolio, and all functionality", "__v": 56 } ], "msApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "playLogDisabled": true, "poc": [ "Agreement" ], "emailSignature": { "content": "<div>hello<br></div>", "enabled": false }, "inactive": false, "removed": false, "tzOffset": -5, "intercomAdminId": "1123812", "custom": {}, "defaultMeetingLength": 60, "isExposedAsSenderOption": false, "splitLayoutDisabled": false, "recentOpenSharedView": "56bccdf554d64d837d01be63", "invoicesSort": "-dueDate", "type": "user", "undefined": null, "googleApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "googleCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} }, "msCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} } }'
To get a specific user it's required to pass the _id in the request URL as a parameter.
Alternately it's possible to get a user using its externalId adding a prefix.
Example:
Example Request
curl --location -g --request get 'https://api.planhat.com/users/564b063a508f068051ee82a5' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}'
Example Response
200 ok
'{ "_id": "564b063a508f068051ee82a5", "nickName": "Diego Checa", "email": "diego@planhat.com", "image": { "path": "" }, "radarOneLine": false, "taskFilter": "", "compressedView": false, "isHidden": false, "createDate": "2016-02-11T18:07:49.173Z", "lastName": "", "firstName": "Diego", "__v": 13, "dailyDigest": true, "followerUpdate": true, "permissions": { "admin": true, "changeOwner": true, "onlyMyPortfolio": false, "developer": true }, "revReportPeriodType": "past x days", "inAppNotifications": true, "playlistSection": "all", "lastDailyDigest": 18830, "accountAccess": "all accounts", "roles": [ { "_id": "000000010000000000000000", "name": "CSM", "description": "Access to a few selected views and relevant accounts", "__v": 393 }, { "_id": "000000030000000000000000", "name": "Developer", "description": "Access to API keys, error pages etc", "__v": 4 }, { "_id": "000000000000000000000000", "name": "Administrator", "description": "Full access, including ability to edit users and settings", "__v": 55 }, { "_id": "000000020000000000000000", "name": "Manager", "description": "Access to the entire portfolio, and all functionality", "__v": 56 } ], "msApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "playLogDisabled": true, "poc": [ "Agreement" ], "emailSignature": { "content": "<div>hello<br></div>", "enabled": false }, "inactive": false, "removed": false, "tzOffset": -5, "intercomAdminId": "1123812", "custom": {}, "defaultMeetingLength": 60, "isExposedAsSenderOption": false, "splitLayoutDisabled": false, "recentOpenSharedView": "56bccdf554d64d837d01be63", "invoicesSort": "-dueDate", "type": "user", "undefined": null, "googleApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "googleCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} }, "msCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} } }'
When fetching multiple users there are some options that can be used via query params:
limit: Limit the list length. Default is 10000, max. 10000.
offset: Start the list on a specific integer index.
sort: Sort based on a specific property. Prefix the property "-" to change the sort order.
select: Select specific properties. Multiple properties can be specified separating them by commas.
Note: The GET /users endpoint will return the following fields by default: firstName, lastName, nickName, email, externalId, image, isHidden, removed, inactive, managers, teams, isExposedAsSenderOption, createdAt, updatedAt, and tzOffset.
If required there is possible to select any other field(s) from the user using the select query param in the request. e.g.:
Example Request
curl --location -g --request get 'https://api.planhat.com/users' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}'
Example Response
200 ok
'[ { "_id": "564b063a508f068051ee82a5", "nickName": "Diego Checa", "email": "diego@planhat.com", "image": { "path": "" }, "radarOneLine": false, "taskFilter": "", "compressedView": false, "isHidden": false, "createDate": "2016-02-11T18:07:49.173Z", "lastName": "", "firstName": "Diego", "__v": 13, "dailyDigest": true, "followerUpdate": true, "permissions": { "admin": true, "changeOwner": true, "onlyMyPortfolio": false, "developer": true }, "revReportPeriodType": "past x days", "inAppNotifications": true, "playlistSection": "all", "lastDailyDigest": 18830, "accountAccess": "all accounts", "roles": [ { "_id": "000000010000000000000000", "name": "CSM", "description": "Access to a few selected views and relevant accounts", "__v": 393 }, { "_id": "000000030000000000000000", "name": "Developer", "description": "Access to API keys, error pages etc", "__v": 4 }, { "_id": "000000000000000000000000", "name": "Administrator", "description": "Full access, including ability to edit users and settings", "__v": 55 }, { "_id": "000000020000000000000000", "name": "Manager", "description": "Access to the entire portfolio, and all functionality", "__v": 56 } ], "msApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "playLogDisabled": true, "poc": [ "Agreement" ], "emailSignature": { "content": "<div>hello<br></div>", "enabled": false }, "inactive": false, "removed": false, "tzOffset": -5, "intercomAdminId": "1123812", "custom": {}, "defaultMeetingLength": 60, "isExposedAsSenderOption": false, "splitLayoutDisabled": false, "recentOpenSharedView": "56bccdf554d64d837d01be63", "invoicesSort": "-dueDate", "type": "user", "undefined": null, "googleApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "googleCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} }, "msCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} } }, { "_id": "5524481f516d59216a6d2b80", "nickName": "Sarah", "email": "sarah@planhat.com", "image": { "spacesKey": "arrivato/team/5524481f516d59216a6d2b80_1527055421955.png", "path": "" }, "radarOneLine": false, "taskFilter": "{\"owner\":\"5524481f516d59216a6d2b80\"}", "compressedView": false, "isHidden": false, "createDate": "2016-02-11T18:07:49.171Z", "lastName": "Jones", "firstName": "Sarah", "__v": 2, "permissions": { "admin": true, "changeOwner": true, "onlyMyPortfolio": false, "developer": false }, "segment": null, "playlistStyle": "calendar", "followerUpdate": false, "revReportPeriodType": "static", "revReportStartDay": 90, "revReportStartDate": "2020-08-01T00:00:00.000Z", "playlistSection": "all", "dailyDigest": true, "bubbleChartXParam": "time-to-renewal", "inAppNotifications": true, "revReportEndDate": "2020-09-01T00:00:00.000Z", "convReportEndDate": "2019-01-24T23:59:59.999Z", "convReportStartDate": "2018-10-26T23:00:00.000Z", "lastDailyDigest": 18831, "accountAccess": "all accounts", "googleApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "msApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "playLogDisabled": true, "roles": [ { "_id": "000000020000000000000000", "name": "Manager", "description": "Access to the entire portfolio, and all functionality", "__v": 56 }, { "_id": "000000000000000000000000", "name": "Administrator", "description": "Full access, including ability to edit users and settings", "__v": 55 }, { "_id": "000000010000000000000000", "name": "CSM", "description": "Access to a few selected views and relevant accounts", "__v": 393 } ], "custom": { "Role": "CSM" }, "disableIncludeChildrenPref": false, "inactive": false, "isExposedAsSenderOption": true, "poc": [], "removed": false, "tzOffset": 1, "splitLayoutDisabled": false, "intercomAdminId": "1019963", "recentOpenSharedView": "56bccdf554d64d837d01be9d", "opportunitiesSort": "landingDate", "opportunitiesColumnPref": { "companyName": true, "title": false, "Status": false, "comment": false, "ownerId": true, "mrr": false, "dealDate": false, "custom-% to Close": false, "custom-Owner": true, "custom-Technical Rep": true }, "issuesColumnPref": { "title": true, "createdAt": true, "status": true, "companies": true, "custom-Priority": true, "endusers": false, "description": false, "source": false, "sourceId": false, "projectId": false, "issueType": false, "priority": false, "sourceUrl": false, "updatedAt": false, "sourceKey": false }, "defaultMeetingLength": 60, "type": "user", "undefined": null, "googleCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} }, "msCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} } } ]'
When fetching multiple users there are some options that can be used via query params:
limit: Limit the list length. Default is 10000, max. 10000.
offset: Start the list on a specific integer index.
sort: Sort based on a specific property. Prefix the property "-" to change the sort order.
select: Select specific properties. Multiple properties can be specified separating them by commas.
Note: The GET /users endpoint will return the following fields by default: firstName, lastName, nickName, email, externalId, image, isHidden, removed, inactive, managers, teams, isExposedAsSenderOption, createdAt, updatedAt, and tzOffset.
If required there is possible to select any other field(s) from the user using the select query param in the request. e.g.:
Example Request
curl --location -g --request get 'https://api.planhat.com/users' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}'
Example Response
200 ok
'[ { "_id": "564b063a508f068051ee82a5", "nickName": "Diego Checa", "email": "diego@planhat.com", "image": { "path": "" }, "radarOneLine": false, "taskFilter": "", "compressedView": false, "isHidden": false, "createDate": "2016-02-11T18:07:49.173Z", "lastName": "", "firstName": "Diego", "__v": 13, "dailyDigest": true, "followerUpdate": true, "permissions": { "admin": true, "changeOwner": true, "onlyMyPortfolio": false, "developer": true }, "revReportPeriodType": "past x days", "inAppNotifications": true, "playlistSection": "all", "lastDailyDigest": 18830, "accountAccess": "all accounts", "roles": [ { "_id": "000000010000000000000000", "name": "CSM", "description": "Access to a few selected views and relevant accounts", "__v": 393 }, { "_id": "000000030000000000000000", "name": "Developer", "description": "Access to API keys, error pages etc", "__v": 4 }, { "_id": "000000000000000000000000", "name": "Administrator", "description": "Full access, including ability to edit users and settings", "__v": 55 }, { "_id": "000000020000000000000000", "name": "Manager", "description": "Access to the entire portfolio, and all functionality", "__v": 56 } ], "msApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "playLogDisabled": true, "poc": [ "Agreement" ], "emailSignature": { "content": "<div>hello<br></div>", "enabled": false }, "inactive": false, "removed": false, "tzOffset": -5, "intercomAdminId": "1123812", "custom": {}, "defaultMeetingLength": 60, "isExposedAsSenderOption": false, "splitLayoutDisabled": false, "recentOpenSharedView": "56bccdf554d64d837d01be63", "invoicesSort": "-dueDate", "type": "user", "undefined": null, "googleApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "googleCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} }, "msCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} } }, { "_id": "5524481f516d59216a6d2b80", "nickName": "Sarah", "email": "sarah@planhat.com", "image": { "spacesKey": "arrivato/team/5524481f516d59216a6d2b80_1527055421955.png", "path": "" }, "radarOneLine": false, "taskFilter": "{\"owner\":\"5524481f516d59216a6d2b80\"}", "compressedView": false, "isHidden": false, "createDate": "2016-02-11T18:07:49.171Z", "lastName": "Jones", "firstName": "Sarah", "__v": 2, "permissions": { "admin": true, "changeOwner": true, "onlyMyPortfolio": false, "developer": false }, "segment": null, "playlistStyle": "calendar", "followerUpdate": false, "revReportPeriodType": "static", "revReportStartDay": 90, "revReportStartDate": "2020-08-01T00:00:00.000Z", "playlistSection": "all", "dailyDigest": true, "bubbleChartXParam": "time-to-renewal", "inAppNotifications": true, "revReportEndDate": "2020-09-01T00:00:00.000Z", "convReportEndDate": "2019-01-24T23:59:59.999Z", "convReportStartDate": "2018-10-26T23:00:00.000Z", "lastDailyDigest": 18831, "accountAccess": "all accounts", "googleApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "msApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "playLogDisabled": true, "roles": [ { "_id": "000000020000000000000000", "name": "Manager", "description": "Access to the entire portfolio, and all functionality", "__v": 56 }, { "_id": "000000000000000000000000", "name": "Administrator", "description": "Full access, including ability to edit users and settings", "__v": 55 }, { "_id": "000000010000000000000000", "name": "CSM", "description": "Access to a few selected views and relevant accounts", "__v": 393 } ], "custom": { "Role": "CSM" }, "disableIncludeChildrenPref": false, "inactive": false, "isExposedAsSenderOption": true, "poc": [], "removed": false, "tzOffset": 1, "splitLayoutDisabled": false, "intercomAdminId": "1019963", "recentOpenSharedView": "56bccdf554d64d837d01be9d", "opportunitiesSort": "landingDate", "opportunitiesColumnPref": { "companyName": true, "title": false, "Status": false, "comment": false, "ownerId": true, "mrr": false, "dealDate": false, "custom-% to Close": false, "custom-Owner": true, "custom-Technical Rep": true }, "issuesColumnPref": { "title": true, "createdAt": true, "status": true, "companies": true, "custom-Priority": true, "endusers": false, "description": false, "source": false, "sourceId": false, "projectId": false, "issueType": false, "priority": false, "sourceUrl": false, "updatedAt": false, "sourceKey": false }, "defaultMeetingLength": 60, "type": "user", "undefined": null, "googleCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} }, "msCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} } } ]'
When fetching multiple users there are some options that can be used via query params:
limit: Limit the list length. Default is 10000, max. 10000.
offset: Start the list on a specific integer index.
sort: Sort based on a specific property. Prefix the property "-" to change the sort order.
select: Select specific properties. Multiple properties can be specified separating them by commas.
Note: The GET /users endpoint will return the following fields by default: firstName, lastName, nickName, email, externalId, image, isHidden, removed, inactive, managers, teams, isExposedAsSenderOption, createdAt, updatedAt, and tzOffset.
If required there is possible to select any other field(s) from the user using the select query param in the request. e.g.:
Example Request
curl --location -g --request get 'https://api.planhat.com/users' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}'
Example Response
200 ok
'[ { "_id": "564b063a508f068051ee82a5", "nickName": "Diego Checa", "email": "diego@planhat.com", "image": { "path": "" }, "radarOneLine": false, "taskFilter": "", "compressedView": false, "isHidden": false, "createDate": "2016-02-11T18:07:49.173Z", "lastName": "", "firstName": "Diego", "__v": 13, "dailyDigest": true, "followerUpdate": true, "permissions": { "admin": true, "changeOwner": true, "onlyMyPortfolio": false, "developer": true }, "revReportPeriodType": "past x days", "inAppNotifications": true, "playlistSection": "all", "lastDailyDigest": 18830, "accountAccess": "all accounts", "roles": [ { "_id": "000000010000000000000000", "name": "CSM", "description": "Access to a few selected views and relevant accounts", "__v": 393 }, { "_id": "000000030000000000000000", "name": "Developer", "description": "Access to API keys, error pages etc", "__v": 4 }, { "_id": "000000000000000000000000", "name": "Administrator", "description": "Full access, including ability to edit users and settings", "__v": 55 }, { "_id": "000000020000000000000000", "name": "Manager", "description": "Access to the entire portfolio, and all functionality", "__v": 56 } ], "msApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "playLogDisabled": true, "poc": [ "Agreement" ], "emailSignature": { "content": "<div>hello<br></div>", "enabled": false }, "inactive": false, "removed": false, "tzOffset": -5, "intercomAdminId": "1123812", "custom": {}, "defaultMeetingLength": 60, "isExposedAsSenderOption": false, "splitLayoutDisabled": false, "recentOpenSharedView": "56bccdf554d64d837d01be63", "invoicesSort": "-dueDate", "type": "user", "undefined": null, "googleApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "googleCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} }, "msCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} } }, { "_id": "5524481f516d59216a6d2b80", "nickName": "Sarah", "email": "sarah@planhat.com", "image": { "spacesKey": "arrivato/team/5524481f516d59216a6d2b80_1527055421955.png", "path": "" }, "radarOneLine": false, "taskFilter": "{\"owner\":\"5524481f516d59216a6d2b80\"}", "compressedView": false, "isHidden": false, "createDate": "2016-02-11T18:07:49.171Z", "lastName": "Jones", "firstName": "Sarah", "__v": 2, "permissions": { "admin": true, "changeOwner": true, "onlyMyPortfolio": false, "developer": false }, "segment": null, "playlistStyle": "calendar", "followerUpdate": false, "revReportPeriodType": "static", "revReportStartDay": 90, "revReportStartDate": "2020-08-01T00:00:00.000Z", "playlistSection": "all", "dailyDigest": true, "bubbleChartXParam": "time-to-renewal", "inAppNotifications": true, "revReportEndDate": "2020-09-01T00:00:00.000Z", "convReportEndDate": "2019-01-24T23:59:59.999Z", "convReportStartDate": "2018-10-26T23:00:00.000Z", "lastDailyDigest": 18831, "accountAccess": "all accounts", "googleApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "msApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedLabels": [] }, "playLogDisabled": true, "roles": [ { "_id": "000000020000000000000000", "name": "Manager", "description": "Access to the entire portfolio, and all functionality", "__v": 56 }, { "_id": "000000000000000000000000", "name": "Administrator", "description": "Full access, including ability to edit users and settings", "__v": 55 }, { "_id": "000000010000000000000000", "name": "CSM", "description": "Access to a few selected views and relevant accounts", "__v": 393 } ], "custom": { "Role": "CSM" }, "disableIncludeChildrenPref": false, "inactive": false, "isExposedAsSenderOption": true, "poc": [], "removed": false, "tzOffset": 1, "splitLayoutDisabled": false, "intercomAdminId": "1019963", "recentOpenSharedView": "56bccdf554d64d837d01be9d", "opportunitiesSort": "landingDate", "opportunitiesColumnPref": { "companyName": true, "title": false, "Status": false, "comment": false, "ownerId": true, "mrr": false, "dealDate": false, "custom-% to Close": false, "custom-Owner": true, "custom-Technical Rep": true }, "issuesColumnPref": { "title": true, "createdAt": true, "status": true, "companies": true, "custom-Priority": true, "endusers": false, "description": false, "source": false, "sourceId": false, "projectId": false, "issueType": false, "priority": false, "sourceUrl": false, "updatedAt": false, "sourceKey": false }, "defaultMeetingLength": 60, "type": "user", "undefined": null, "googleCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} }, "msCalendarApi": { "accessEnabled": false, "syncEnabled": false, "syncInitial": false, "syncedCalendars": [], "calendarToSave": {} } } ]'
To delete a user it's required to pass the _id in the request URL as a parameter.
Example Request
curl --location -g --request delete 'https://api.planhat.com/users/61031e2ad414d49dcdb61b22' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}'
Example Response
200 ok
'{}'To delete a user it's required to pass the _id in the request URL as a parameter.
Example Request
curl --location -g --request delete 'https://api.planhat.com/users/61031e2ad414d49dcdb61b22' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}'
Example Response
200 ok
'{}'To delete a user it's required to pass the _id in the request URL as a parameter.
Example Request
curl --location -g --request delete 'https://api.planhat.com/users/61031e2ad414d49dcdb61b22' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}'
Example Response
200 ok
'{}'To create a user it's required to define a nickName, email, firstName, and lastName.
To update a user it is required to specify in the payload one of the following keyables, listed in order of priority: _id, externalId, email.
Since this is a bulk upsert operation it's possible to create and/or update multiple users with the same payload.
For more details please refer to the bulk upsert section.
There is an upper limit of 5,000 items per request.
Example Request
curl --location -g --request put 'https://api.planhat.com/users' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' \ --data-raw '[ { "email": "rob@test.com", "firstName": "Robbert", "lastName": "Rob", "nickName": "Tyler", "roles": [ "57e2b92ff795575a5b8c4659" ] }, { "email": "liz@test.com", "firstName": "Liz", "lastName": "Elizabeth", "nickName": "Gates", "roles": [ "5d35c292344cb854c0a5af28" ] } ]'
Example Response
200 ok
'{ "created": 2, "createdErrors": [], "insertsKeys": [ { "_id": "61033193e41b0aa81c926c8b", "email": "rob@test.com" }, { "_id": "61033193e41b0aa81c926c8c", "email": "liz@test.com" } ], "updated": 0, "updatedErrors": [], "updatesKeys": [], "nonupdates": 0, "modified": [], "upsertedIds": [ "61033193e41b0aa81c926c8b", "61033193e41b0aa81c926c8c" ], "permissionErrors": [] }'
To create a user it's required to define a nickName, email, firstName, and lastName.
To update a user it is required to specify in the payload one of the following keyables, listed in order of priority: _id, externalId, email.
Since this is a bulk upsert operation it's possible to create and/or update multiple users with the same payload.
For more details please refer to the bulk upsert section.
There is an upper limit of 5,000 items per request.
Example Request
curl --location -g --request put 'https://api.planhat.com/users' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' \ --data-raw '[ { "email": "rob@test.com", "firstName": "Robbert", "lastName": "Rob", "nickName": "Tyler", "roles": [ "57e2b92ff795575a5b8c4659" ] }, { "email": "liz@test.com", "firstName": "Liz", "lastName": "Elizabeth", "nickName": "Gates", "roles": [ "5d35c292344cb854c0a5af28" ] } ]'
Example Response
200 ok
'{ "created": 2, "createdErrors": [], "insertsKeys": [ { "_id": "61033193e41b0aa81c926c8b", "email": "rob@test.com" }, { "_id": "61033193e41b0aa81c926c8c", "email": "liz@test.com" } ], "updated": 0, "updatedErrors": [], "updatesKeys": [], "nonupdates": 0, "modified": [], "upsertedIds": [ "61033193e41b0aa81c926c8b", "61033193e41b0aa81c926c8c" ], "permissionErrors": [] }'
To create a user it's required to define a nickName, email, firstName, and lastName.
To update a user it is required to specify in the payload one of the following keyables, listed in order of priority: _id, externalId, email.
Since this is a bulk upsert operation it's possible to create and/or update multiple users with the same payload.
For more details please refer to the bulk upsert section.
There is an upper limit of 5,000 items per request.
Example Request
curl --location -g --request put 'https://api.planhat.com/users' \ --header 'Content-Type: application/json' \ --header 'Authorization: Bearer {{apiToken}}' \ --data-raw '[ { "email": "rob@test.com", "firstName": "Robbert", "lastName": "Rob", "nickName": "Tyler", "roles": [ "57e2b92ff795575a5b8c4659" ] }, { "email": "liz@test.com", "firstName": "Liz", "lastName": "Elizabeth", "nickName": "Gates", "roles": [ "5d35c292344cb854c0a5af28" ] } ]'
Example Response
200 ok
'{ "created": 2, "createdErrors": [], "insertsKeys": [ { "_id": "61033193e41b0aa81c926c8b", "email": "rob@test.com" }, { "_id": "61033193e41b0aa81c926c8c", "email": "liz@test.com" } ], "updated": 0, "updatedErrors": [], "updatesKeys": [], "nonupdates": 0, "modified": [], "upsertedIds": [ "61033193e41b0aa81c926c8b", "61033193e41b0aa81c926c8c" ], "permissionErrors": [] }'
