I am using Hubspot CRM API to automate some specific processes. When I try to get contact_to_email or deal_to_email associations I get only our team Emails. Do I understand right that getting Contact or Deal-related customer Emails/Replies is impossible?
Hi @Tillforty
If you’re trying to get a list of all emails associated to a deal/contact you can use:
Post /crm/v3/objects/emails/search
With the body:
{
"properties": [
"hs_email_direction","hs_email_subject","hs_email_text"
],
"filterGroups": [{
"filters": [{
"propertyName": "associations.deal",
"operator": "EQ",
"value": "Insert Deal ID Here"
}]
}]
}
For more information please see here.
Thanks it worked. Just sad, that plain HTML value is empty which makes a whole task for me way more complicated ![]()
{
"id": "xxx",
"properties": {
"hs_createdate": "2024-04-12T09:02:11.886Z",
"hs_email_direction": "INCOMING_EMAIL",
"hs_email_html": "<html>\n<head> \n<meta http-equiv=\"content-type\" content=\"text/html; </html>",
"hs_email_subject": "xxx",
"hs_email_text": null,
"hs_lastmodifieddate": "xxx",
"hs_object_id": "xxx"
},
"createdAt": "2024-04-12T09:02:11.886Z",
"updatedAt": "2024-04-12T09:02:12.037Z",
"archived": false
}