Get detailed properties of deleted contact

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?

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.