Is there a way to search for a user by email address (probably same as user name)? I’m trying to look up a user to populate the Company Owner field when creating/updating companies.
Hello @johnpp2, currently we have a settings “user provisioning API”. You can visit this page to read about it: More information here. (This API can be used to manage the users on an account and manage the roles of those users.)
I hope this information helps.
Pam
@johnpp2, you can either use the CRM search
{
"filters": [
{
"propertyName": "email",
"operator": "EQ",
"value": "dogs@cats.com"
}
]
}
or you can use the older V1 endpoint
Hi @johnpp2 ,
you can search user according to email id or user id by this api
Below is the Node Code ,please use it to get user info with email var request = require(“request”);
var options = {
method: ‘POST’,
url: ‘https://api.hubapi.com/settings/v3/users/’,
headers: {accept: ‘application/json’, ‘content-type’: ‘application/json’},
body: {
email: ‘newUser@email.com’,
sendWelcomeEmail: ‘true’
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
}); for more info please refer to this doc Accounts Dashboard | HubSpot
Hope this helps!
If we were able to answer your query, kindly help the community by marking it as a solution.
Thanks and Regards.
The code you’ve provided is to create a new user. I don’t understand how it answers the question.