# Issue logging mail

**URL:** <https://community.hubspot.com/t/issue-logging-mail/110236>\
**Category:** Sales Email\
**Created:** [June 27, 2024, 7:10am UTC](https://community.hubspot.com/t/issue-logging-mail/110236 "2024-06-27T07:10:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aliqazi2](https://avatars.discourse-cdn.com/v4/letter/a/e0b2c6/32.png) [@aliqazi2](https://community.hubspot.com/u/aliqazi2)\
**Post date:** [June 27, 2024, 7:10am UTC](https://community.hubspot.com/t/issue-logging-mail/110236/1 "2024-06-27T07:10:52Z")

</div>

i am using the single email api to send mail to the user , but i also want to log the email into the system , it sends the mail using this api but not logging the email using the create email api

---

<div class="post-metadata">

**Author:** ![Gaurav\_Aggarwal](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/gaurav_aggarwal/32/26578_2.png) [@Gaurav\_Aggarwal](https://community.hubspot.com/u/Gaurav_Aggarwal)\
**Post date:** [June 27, 2024, 7:40am UTC](https://community.hubspot.com/t/issue-logging-mail/110236/2 "2024-06-27T07:40:16Z")

</div>

Hey @aliqazi2

If we are correct you should go through this guide here: [Marketing API | Marketing Email - HubSpot docs](https://developers.hubspot.com/docs/api/marketing/transactional-emails)

 ![truva_0-1719474033875.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/5/5d5c12dc9ee015e8fd12603da1e073fe0083ce12.png)

It says that: HubSpot does not save the HTML/JSON sent through this API. You can review the email template from the recipient contact’s timeline, but if you want to keep a record of the email’s contents, it’s recommended to add a BCC to the email.

---

<div class="post-metadata">

**Author:** ![ArisudanTiwari](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/arisudantiwari/32/93919_2.png) [@ArisudanTiwari](https://community.hubspot.com/u/ArisudanTiwari)\
**Post date:** [June 27, 2024, 9:04am UTC](https://community.hubspot.com/t/issue-logging-mail/110236/3 "2024-06-27T09:04:55Z")

</div>

Hi @aliqazi2 ,

There are two ways to address the issue of logging emails in HubSpot using the API:

**1. Single Send API and Engagement API:**

The Single Send API can be used to send your email as planned. However, it doesn’t directly log the email within HubSpot.  
After a successful email delivery (confirmed through the Single Send API response), you can utilize the HubSpot Engagement API’s _ **POST /crm/v3/objects/emails** _ endpoint to create a new email record within the system. This logs the email details in HubSpot.  
**2. Workflows with Custom Properties (Alternative):**

HubSpot workflows can be triggered by the Single Send API call.  
Within the workflow, you can create a custom property to indicate the email was sent via Single Send API.  
The workflow can then create a new email record using the CRM Email API.

**Refer to HubSpot’s Documentation:**

For detailed instructions on using these APIs, refer to the HubSpot developer documentation:

**Single Send API:** [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/marketing/single-send-api)  
**Engagement API:** [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/email)  
**CRM Email API:** [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/email)  
By following these steps, you can ensure your emails are sent and logged effectively within HubSpot.
