How to Edit a Record in a List and Update Custom Properties?

Hi,

I’m trying to achieve the following:

  • I have an existing static list in HubSpot.
  • I want to edit a specific record.
  • I need to update its custom properties:
    • company score
    • company evaluation

I came across the List API Docs, but I’m not entirely sure if I’m using them correctly or if there’s a more efficient way to do this.
Any advice or examples would be greatly appreciated! :blush:
May

Hey, @MRamatiKroitero :waving_hand: Thanks for the great question. I have some insight for you. But also a few questions to help clarify things :blush:

  • Are you working with a Company-based list?
  • Are you wanting to update the value for a custom Company property for a record on your list?

If so, you’ll likely need to make two calls:

  • Use the List API to get the membership and record IDs for the List
  • Use the Company API to send a PATCH request to update the specific values for the properties you want to update

We can use the documentation pages for these endpoints to test with to keep it simple. Here’s how I set up my quick test:

  • created two custom Company properties to match your examples

  • picked two companies and added values for both

  • created a static list and included both companies

  • made a request to the List API to get the membership and record IDs
    Fetch List Memberships Ordered by Added to List Date

    GET 
    curl --request GET \
     --url 'https://api.hubapi.com/crm/v3/lists/139/memberships/join-order?limit=100' \
     --header 'authorization: Bearer YOUR_ACCESS_TOKEN'​
    
    HTTP 200
    
    {
     "results": [
     {
     "recordId": "10202231595",
     "membershipTimestamp": "2025-01-28T23:21:13.141Z"
     },
     {
     "recordId": "10202231613",
     "membershipTimestamp": "2025-01-28T23:21:13.016Z"
     }
     ],
     "total": 2
    }
    
  • take the record IDs and make a PATCH request to the Companies API endpoint — Update a Company We’ll update values for both Properties

    curl --request PATCH \
     --url https://api.hubapi.com/crm/v3/objects/companies/10202231595 \
     --header 'authorization: Bearer YOUR_ACCESS_TOKEN' \
     --header 'content-type: application/json' \
     --data '{
     "properties": {
     "company_score": "cat",
     "company_evaluation": "dog"
     }
    }'​
    
    HTTP 200
    
    {
     "id": "10202231595",
     "properties": {
     "company_evaluation": "dog",
     "company_score": "cat",
     "createdate": "2022-11-29T19:11:16.389Z",
     "hs_all_accessible_team_ids": "12073943",
     "hs_all_owner_ids": "198670650",
     "hs_all_team_ids": "12073943",
     "hs_created_by_user_id": "10233975",
     "hs_lastmodifieddate": "2025-01-28T23:28:53.506Z",
     "hs_object_id": "10202231595",
     "hs_object_source": "CRM_UI",
     "hs_object_source_id": "userId:10233975",
     "hs_object_source_label": "CRM_UI",
     "hs_object_source_user_id": "10233975",
     "hs_pipeline": "companies-lifecycle-pipeline",
     "hs_updated_by_user_id": "10233975",
     "hs_user_ids_of_all_owners": "10233975",
     "hubspot_owner_assigneddate": "2022-11-29T19:11:16.389Z",
     "hubspot_owner_id": "198670650",
     "hubspot_team_id": "12073943",
     "lifecyclestage": "opportunity"
     },
     "createdAt": "2022-11-29T19:11:16.389Z",
     "updatedAt": "2025-01-28T23:28:53.506Z",
     "archived": false
    }
    
  • We can verify the changes were applied by making a request to the Retrieve a Comapny endpoint and including the two custom properties in the request

    curl --request GET \
     --url 'https://api.hubapi.com/crm/v3/objects/companies/10202231595?properties=company_score%2Ccompany_evaluation&archived=false' \
     --header 'authorization: Bearer YOUR_ACCESS_TOKEN'​
    
    HTTP 200
    
    {
     "id": "10202231595",
     "properties": {
     "company_evaluation": "dog",
     "company_score": "cat",
     "createdate": "2022-11-29T19:11:16.389Z",
     "hs_lastmodifieddate": "2025-01-28T23:28:53.506Z",
     "hs_object_id": "10202231595"
     },
     "createdAt": "2022-11-29T19:11:16.389Z",
     "updatedAt": "2025-01-28T23:28:53.506Z",
     "archived": false
    }
    

Have fun testing! — Jaycee