How to update custom property value in HubSpot with REST API call

If you want to update record value for HubSpot Contacts, Accounts, Deals or any other module then check below steps

Add Custom Field in HubSpot

First, let’s look at how to add a custom field in HubSpot. For example, we will use the contacts module.

  1. Navigate to any contact and click View All Properties
  2. Now click on Manage Properties
    Manage Properties
  3. Click Create Property to create a custom property in HubSpot
    Create Custom Property in HubSpot
  4. For example to add a drop-down field you can pick something like this on the wizard (3rd step). Select Field Name, Group, DataType and allowed Options for selection (Depending on datatype you choose screen might differ)

Update Custom Field Values in HubSpot Contacts, Accounts, Deals using ODBC

To update any module (including custom fields) you can call API or use ODBC Driver like this

Here is an example of how to issue updates for standard and custom fields

UPDATE HubSpot Contacts Example

UPDATE Contacts
SET firstname = 'Brian-Upd'
   ,lastname = 'Halligan-Upd (Sample Contact)'
   ,custom_number=12.12
   ,custom_string='My Test2024-02-02T13:48:53'
   ,custom_dropdown='BB'
WHERE Id = 51
WITH(Output='id,company_size')

Read HubSpot Contacts Example

select id, email,firstname, lastname, custom_string, custom_number from contacts WHERE Id = 51 

Update Issue with Dropdown Property

If you try to update the Dropdown Property and value not part of defined options you may get the following error. So only set value which is part of option list (see previous section).

Status Code: BadRequest

Response Body: {"status":"error","message":"Property values were not valid: [{\"isValid\":false,\"message\":\"BB1 was not one of the allowed options: [label: \\\"AA\\\"\\nvalue: \\\"AA\\\"\\ndisplay_order: 0\\nhidden: false\\nread_only: false\\n, label: \\\"BB\\\"\\nvalue: \\\"BB\\\"\\ndisplay_order: 1\\nhidden: false\\nread_only: false\\n, label: \\\"CC\\\"\\nvalue: \\\"CC\\\"\\ndisplay_order: 2\\nhidden: false\\nread_only: false\\n]\",\"error\":\"INVALID_OPTION\",\"name\":\"custom_dropdown\"}]","correlationId":"fd1c21ca-548c-4d71-b3d4-7a29a69ca36b","category":"VALIDATION_ERROR"}