Update contact property "contact owner"

I need to automate changing the contact owner name (“name”: “hubspot_owner_id”,“label”: “Contact owner” ) to null, every time the associated Company Owner gets set to null, however I dont know how to go about this. I cant do update contact, because the property “hubspot_owner_id” returns a 400 error. And updating a contact property Im not sure and might be completely wrong on this one, but is not for a specific user so I cant do this this way. Is there any other way I can accomplish this?

Hi @mario,

Can you give me some more details on the issue(s) you’re running into? You should be able to set the Contact Owner property to ‘No Owner’ by passing a blank string ("") as the property value. You should be able to use the ‘Update a contact’ endpoint, something like this:

'POST https://api.hubapi.com/contacts/v1/contact/vid/122051/profile?hapikey=demo'
//Body:
{
 "properties": [
 {
 "property": "hubspot_owner_id",
 "value": ""
 }
 ]
}

developers.hubspot.com

Update an existing contact | Contacts API

POST /contacts/v1/contact/vid/:contact_id/profile - Update an existing contact in HubSpot. This method lets you update one of many fields of a contact in HubSpot.