When I create an email using the POST https://api.hubapi.com/crm/v3/objects/email endpoint with
{
"properties": {
"hs_timestamp": "2024-08-21T12:35:00.000Z",
"hubspot_owner_id": 406511315,
"hs_email_direction": "EMAIL",
"hs_email_subject": "Re: Hubspot API Test",
"hs_email_text": "Fred,\r\nThe renewal quote you've sent for Standard Plan is $2,797/year for a 2-year\r\ncommitment.\r\n\r\nStandard Plan on the website is $25/month/user for a 1-year commitment.\r\n\r\n",
"hs_email_status": "SENT",
"hs_email_headers": "{\"from\":{\"email\":\" graeme.harker@normanandsons.com \",\"firstName\":\"Graeme\",\"lastName\":\"Harker\"},\"to\":[{\"email\":\" fred.bloggs@bloggs.com \",\"firstName\":\"Fred\",\"lastName\":\"Bloggs\"}],\"cc\":[],\"bcc\":[]}"
},
"associations": [
{
"to": {
"id": "8283"
},
"types": [
{
"associationCategory": "HUBSPOT_DEFINED",
"associationTypeId": 198
}
]
}
]
}
The email appears in Hubspot with the newlines stipped
but if I click on the email in Hubspot (as if to edit it) I can see the newlines.
What am I doing wrong?



