Owners (User-type Objects)

Owners (or users) are a critical part of any CRM system, allowing the ownership of any object to a relevant person (or perhaps a specified queue). We recommend that you store a mapping of HubSpot users to users within your system.

Keeping Your Database Updated

Poll the ‘Get List of Owners’ endpoint at regular intervals (as with all endpoints, no more often than once every five minutes) for any new or updated HubSpot users, and then update your internal database with the new user data, relating it back to an existing user or creating a new user where the returned ‘ownerId’ doesn’t match that of any existing user records. Users can also be representative of a lead queue, for example. Ideally, you'll keep a mapping of HubSpot owner ids to your applications user object identifier.
We recommend keeping a timestamp of the last update to any given HubSpot User within your internal system, and then comparing that with a timestamp taken whenever an update API call is made to HubSpot to ensure that your internal database always contains the latest user data.

Creating a New Owner

To create new HubSpot owner, use the ‘Create an Owner‘ endpoint. A successful call will return the owner as a JSON object; pay attention to the returned ‘ownerId’ property, which is the unique identifier of the owner within HubSpot. Store this Id against the relevant owner-type object within your own system every time you create an owner; you will need it to associate a given object with the relevant owner.

Updating an Existing Owner

To update a HubSpot owner, use the ‘Update an Owner’ endpoint. This will return the owner in JSON format.
We recommend keeping a timestamp of the last update to an owner within your internal system, and then comparing that with a timestamp taken whenever an update API call is made to ensure that your internal database always has the newest data.

Deleting an Existing Owner

You can delete a HubSpot owner by using the ‘Delete an Owner‘ endpoint, passing the relevant ‘ownerId’ with the call. Successful deletion of the contact will be indicated by the return of HTTP status 204.

Docs for this section or API