Get dynamic list-memberships for a contact


When using the Get Contact By Email API call, I see one of the returned properties in the JSON is "list-memberships". Something like:

   [ { 'static-list-id': 5,
       'internal-list-id': 5,
       timestamp: 1524852344319,
       vid: 6708,
       'is-member': true },
     { 'static-list-id': 6,
       'internal-list-id': 6,
       timestamp: 1524852385691,
       vid: 6708,
       'is-member': true }]

Is the list-memberships array also supposed to contain dynamic list memberships? Or just static?


Or maybe someone can help me understand the difference between "static-list-id" vs "internal-list-id".


Hey, @Amit_Gupta.

Happy to clarify.

The use of "static" in the static-list-id property is unrelated to whether the list is static or active (dynamic). Instead, it simply indicates that HubSpot will maintain the list ID despite potential changes to the list. In other words, the ID is static rather than the list and its contents.

The definitions of these two properties are included in the Contacts API Overview documentation:

  • "static-list-id": Integer; The ID of the contact list.
  • "internal-list-id": Integer; DEPRECATED - Use the static-list-id to look up the contact list.

Thus, the static-list-id contains both static and active list IDs. To determine the active list memberships of a contact, you can cross-reference the static-list-id values you receive with the results from this endpoint.