APIs & Integrations

NVerma7
Member

Need Change API endpoints from v1 to v3

Hello,

I'm currently working on updating an integration that still uses the HubSpot V1 API to V3, but I'm encountering some issues with specific endpoints.

 

The endpoint:

https://api.hubapi.com/contacts/v1/lists/{listId}/contacts/recent

Does this have a functional equivalent in V3, or will it continue to be supported?

Although there is an endpoint in V3:

/crm/v3/objects/contacts/{contactId}

it doesn't return all the same data as the V1 /profile endpoint. To retrieve similar information, I have to use the ?properties= query parameter — but the list of properties gets really long (I mean really), and I'm unsure if that's the proper or recommended approach.

Thanks in advance — I look forward to your response!

0 Upvotes
4 Replies 4
EnesJakupi
Member | Elite Partner
Member | Elite Partner

Need Change API endpoints from v1 to v3

So to switch to v3 you will have to take a Two-Step Process: 

1. Get the List Memberships 
 - Use the v3 List API to get contact IDs from a specific list: https://api.hubapi.com/crm/v3/lists/{listId}/memberships 

 

After you have the list then you can: 
2. Batch read Contact Details with post request on https://api.hubapi.com/crm/v3/objects/contacts/batch/read
with needed properties, in your case maybe: 
"properties": [ "firstname", "lastname", "email", "lastmodifieddate"]

 

-- You then have two(three) option for the filtering: 

1 and 2 are to be used for client-side filtering after retrieving the batch results
1. Since V3 Contacts API supports and you recieveupdatedAt , you can filter contacts updated after the specified timestamp. 

2. After you include the lastmodifieddate , then you can sort the results by last modification date.
3. Third avaliable option is the search api https://api.hubapi.com/crm/v3/objects/contacts/search for more complex filtering using the lastmodifieddate . However careful with the limits. 

Hope this solves your problem. Have a good one. 

0 Upvotes
NVerma7
Member

Need Change API endpoints from v1 to v3

I am hitting this Url - https://api.hubapi.com/properties/v3/properties/contacts
And I am also using Bearer token but getting this response .
{
"status": "error",
"message": "Any of the listed authentication credentials are missing",
"correlationId": "3955d588-f4ad-4ad0-8d1f-040a715650ea",
"engagement": {
"service-to-service": "service-to-service not engaged. Metadata for service-to-service request not found.",
"internal-cookie": "internal-cookie not engaged. You can get a new internal auth cookie for host 'api.hubapi.com' by visiting following link from your current browser window: https://tools.hubteam.com/login/host/api.hubapi.com .",
"app-cookie": "app-cookie not engaged. App cookie is not present on the request."
}
}

Please have look an help me what this 

0 Upvotes
EnesJakupi
Member | Elite Partner
Member | Elite Partner

Need Change API endpoints from v1 to v3

Hi NVerma7,
The URL https://api.hubapi.com/properties/v3/properties/contacts  to get contact properties is wrong. 
 


The correct endpoint 

 

https://api.hubapi.com/crm/v3/properties/{objectType} 

 

or in your case

 

https://api.hubapi.com/crm/v3/properties/contacts 

0 Upvotes
NVerma7
Member

Need Change API endpoints from v1 to v3

We are currently migrating from the deprecated V1 endpoint:

GET /contacts/v1/lists/{listId}/contacts/recent

We were using this to retrieve recently updated or added contacts from a specific list, optionally filtered by a timestamp (time-offset).

As this endpoint is no longer available in V3, we would like to understand the correct approach in V3 to achieve the same goal. Specifically:

  1. How can we retrieve recent contacts from a given static or dynamic list (via list ID) using V3 APIs?

  2. If not directly possible, what is the recommended workaround to fetch contacts associated with a list, filtered by last modified date or a specific timestamp (like last 1 day)?

  3. Can we filter contacts using a custom property (like source_list_id) or via workflows to replicate the original behavior?

We’ve reviewed https://api.hubapi.com/crm/v3/properties/contacts, which supports date filtering vialastmodifieddate, but we couldn’t find a way to filter by list membership.

Please advise on the recommended setup or workaround to get this data accurately.

0 Upvotes