Creating an owner during contact assignment


We have a situation where not every salesperson that uses our CRM (Dynamics) exists as a user (or owner) in HubSpot. Instead of passing in a pre-existing hubspot_owner_id when I create/update a contact, is there a way to provide an email address to the Contacts API and have HubSpot look up the owner ID or create the owner if it doesn’t exist?

Without this ability we have to do this every time we sync contacts:

  • Get hubspot_owner_id by email address via the Owners API
  • If it doesn’t exist, create it
  • Pass the hubspot_owner_id to the Contacts API

Also, if the remote source isn’t HubSpot or Salesforce, why do we have to provide a different secondary email? What if the person only has one email address?


Hi @rsobers

If you’re setting the owner ID through the API, you’ll need to use the numerical ID, as the property won’t support translating the email to the ID. Also, if you’re pulling the owners for each contact update, I’d recommend caching that data instead to save on the number of requests being made.

The remote list of emails is used for the connected accounts listed for your user (under Settings > My Profile > Connected Accounts). The validation is designed to prevent cases where a connected email could be set to the email of another user. Owners need to have at least one active remote in order to be considered active (only active owners show up as an option when editing records in the HubSpot app).


Thanks @dadams.

What’s the best practice for syncing ownership between HubSpot and a CRM then?


If it’s not possible to add those people to HubSpot as sales users (since users automatically get added as owners), then adding them with an EMAIL remote would be the best way to do that. There’s no validation on the remoteType for email remotes, and it won’t be used if there isn’t a corresponding HubSpot user, so one solution we’ve had other customers use is to just strip the email at the @ symbol.


OK, then I guess I have to store the hubspot_owner_id as a property on the user records in CRM so that when a new contact is created and assigned in CRM and I want to sync it to HubSpot I can do so without a lookup via the Owners API.

This was much easier to do when ownership used to be controlled by the (now deprecated) HubSpot Owner Email field–CRMs didn’t have to keep track of any IDs generated by HubSpot. I like how the Contacts API is driven by email address. Wish the Owners API was the same.

(Note: creating these people as sales users in HubSpot doesn’t improve the situation at all.)


I’m fairly new to the HubSpot API… but I ran into this pretty quick. I’m calling the API from a custom 3rd party internal application. When creating a contact… I already know the owner in the internal app – but can’t find a way to set the Owner when I create it in HubSpot via the API.

I was a bit surprised that I couldn’t set the Owner… then I found this thread. Has anything changed since last August on this? Any way to set the owner via the API? Saving the owner ids in the internal system isn’t a problem… but it seems there is no way to set it.

Am I missing something?


Agreed, as I understand it this requires any 3rd party to know the Hubspot OWNER id prior to sending in a new lead and assigning it directly to the owner. Its seems crazy to me not to have a “match by email” feature with a “default” assignee for any failures. Bad design to require all 3rd parties to maintain independent records that could be added or removed from Hubspot at any time.