We use cookies to make HubSpot's community a better place. Cookies help to provide a more personalized experience and relevant advertising for you, and web analytics for us. To learn more, and to see a full list of cookies we use, check out our Cookie Policy (baked goods not included).
Dec 8, 2021 5:18 AM
I am trying to fetch contacts deleted depending on the deleted date?
Can contacts be searched based on deletion date using API?
Is it possible to do the same using API call?
If yes please help us with the curl request?
If no is there any other to achieve this apart from using webhook functionality
Thanks!
Dec 14, 2021 10:48 PM
Hi @dennisedson
As I have mentioned in my question I am looking for a way to filter out deleted contacts based on deletion date using the rest API call apart from webhook functionality
So there is no other way to do the same?
Thanks!!
Dec 14, 2021 2:25 AM
Dec 14, 2021 10:26 AM
I think the only way you can approach this is by setting up a webhook to subscribe to the record deletion. This will include a timestamp that you can the reference.
Example payload:
{
"eventId": 3062429327,
"subscriptionId": 1065544,
"portalId": xxxx,
"appId": 223916,
"occurredAt": 1639495413987,
"subscriptionType": "company.deletion",
"attemptNumber": 1,
"objectId": 4889208681,
"changeFlag": "DELETED",
"changeSource": "API"
}
Dec 12, 2021 10:39 PM
Dec 9, 2021 1:39 AM
Hi @dennisedson
I am aware of this to get all deleted contacts
But I really need to filter depending on the deleted date
Is there any way to achieve this?
Thanks!!
Dec 10, 2021 10:22 AM
Dec 8, 2021 3:55 PM
Not sure about the deletion date part, but you can get a list of deleted contacts by settinng the archived parameter to true. eg:
https://api.hubapi.com/crm/v3/objects/contacts?archived=true&hapikey={{hapikey}}