APIs & Integrations

SSun7
Participant

Get detailed properties of deleted contact

SOLVE

Hello, I'm working on webhook events contact.deletion. The payload would include an objectId of the deleted contact, but when I tried to send a GET request to https://api.hubapi.com/crm/v3/objects/contacts/${objectId}, it would give a 404 error, which I assum is because this contact is already deleted. However, I really need to get the email or phone properties of this deleted contact in my server. Is there any way to achieve this?

0 Upvotes
1 Accepted solution
MichaelMa
Solution
Contributor

Get detailed properties of deleted contact

SOLVE

If the contact is ARCHIVED, then you can can add the ?archived=true to the GET request to retrieve it. 

https://api.hubapi.com/crm/v3/objects/contacts/${objectId}?archived=true

 

But if it's deleted, I don't believe it's possible. If it's deleted, you can try restoring the contact in Hubspot, retrieving the data and then deleting the contact again.

View solution in original post

0 Upvotes
1 Reply 1
MichaelMa
Solution
Contributor

Get detailed properties of deleted contact

SOLVE

If the contact is ARCHIVED, then you can can add the ?archived=true to the GET request to retrieve it. 

https://api.hubapi.com/crm/v3/objects/contacts/${objectId}?archived=true

 

But if it's deleted, I don't believe it's possible. If it's deleted, you can try restoring the contact in Hubspot, retrieving the data and then deleting the contact again.

0 Upvotes