Hello,
I try to import tickets from another system to Hubspot using your API. We need that all old tickets and discussion on each ticket to be displayed in Customer Portal.
I managed to create a ticket and add a reply from our staff to this ticket. The ticket and this reply is correct displayed in Customer Portal, all is fine.
Then I tried to add the messages sent by Customer. For messages sent by customers, I used https://api.hubapi.com/crm/v3/objects/emails but those messages(answers) are not displayed in Customer Portal.
curl 'https://api.hubapi.com/crm/v3/objects/emails' --header 'authorization: Bearer MY-SECRET' --data '{"properties":{"hs_timestamp":1681921277374,"hubspot_owner_id":"814909395","hs_email_direction":"INCOMING_EMAIL","hs_email_status":"SENT","hs_email_subject":"bla","hs_email_text":"customer x answer from api 2","hs_email_headers":"{\"from\":{\"email\":\"CUSTOMEREMAIL@gmail.com\"},\"to\":[{\"email\":\"XXX@MYCOMPANY.com\"}],\"cc\":[],\"bcc\":[]}"},"associations":[{"to":{"id":"1215231466"},"types":[{"associationCategory":"HUBSPOT_DEFINED","associationTypeId":18}]},{"to":{"id":"2501"},"types":[{"associationCategory":"HUBSPOT_DEFINED","associationTypeId":10}]}]}'
or in a easy to read mode
{
"properties": {
"hs_timestamp": 1681921277374,
"hubspot_owner_id": "814909395",
"hs_email_direction": "INCOMING_EMAIL",
"hs_email_status": "SENT",
"hs_email_subject": "bla",
"hs_email_text": "customer x answer from api 2",
"hs_email_headers": "{\"from\":{\"email\":\"CUSTOMEREMAIL@gmail.com\"},\"to\":[{\"email\":\"XXX@MYCOMPANY.com\"}],\"cc\":[],\"bcc\":[]}"
},
"associations": [
{
"to": {
"id": "1215231466"
},
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": 18
}
]
},
{
"to": {
"id": "2501"
},
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": 10
}
]
}
]
}
The result of this request is:
- in backend, the reply is visible on ticket
- the associations are correct
- this email is not counted in conversation
- in customer portal the answer is NOT displayed
This is the situation in customer portal:
My question is obvious, how do I add from API the customer’s answer to a ticket?
Thank you.

