I am trying to set up an API call to send an email in Hubspot by following this documentation: https://legacydocs.hubspot.com/docs/methods/email/transactional_email/single-send-overview
The personalization token’s internal name in Hubspot is ‘reports_list’.
The body of the api request is this:
{“emailId”:XXX,
“message”:{“to":"XXX@XXX.com”},
“customProperties”:[{“name”:“reports_list”,“value”:“<ul><li>first list element</li><li>second list element</li></ul>”}]}
(I replaced the email ID and email address with ‘XXX’ for what are hopefully obvious reasons)
I then run the following code:
var apiRequest = new RestRequest($'/email/public/v1/singleEmail/send?hapikey={apiKey}");
// (code to set up the body, a json object, the exact value of which is pasted above in bold)
apiRequest.AddJsonBody(body)
var apiResponse = client.Post(apiRequest)
The email sends correctly, to the specified user, with the specified email ID, but instead of replacing the ‘reports_list’ personalization token in the email with “<ul><li>first list element</li><li>second list element</li></ul>”, it just uses the default value.
Any ideas what might be going wrong?

