# Get logged email activity date via API

**URL:** <https://community.hubspot.com/t/get-logged-email-activity-date-via-api/115218>\
**Category:** Marketplace Apps\
**Tags:** integrations\
**Created:** [August 26, 2024, 3:54pm UTC](https://community.hubspot.com/t/get-logged-email-activity-date-via-api/115218 "2024-08-26T15:54:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![mestopinalesb](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mestopinalesb](https://community.hubspot.com/u/mestopinalesb)\
**Post date:** [August 26, 2024, 3:54pm UTC](https://community.hubspot.com/t/get-logged-email-activity-date-via-api/115218/1 "2024-08-26T15:54:14Z")

</div>

From the UI when a new logged email is added to a contact (or editing one), the user can choose the sending date which can be different from the creation date of the logged email object.

Using the Hubspot API, how can I retrieve a logged email’s sending date or activity date?

According to the API documentation, I can only get the hs\_timestamp field which is the creation date.

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fapi-reference%2Fcrm-emails-v3%2Fguide)**

Thanks!

---

<div class="post-metadata">

**Author:** ![TomM2](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tomm2/32/70887_2.png) [@TomM2](https://community.hubspot.com/u/TomM2)\
**Post date:** [August 26, 2024, 5:13pm UTC](https://community.hubspot.com/t/get-logged-email-activity-date-via-api/115218/2 "2024-08-26T17:13:02Z")

</div>

Hey [@mestopiñalesb](https://community.hubspot.com/t5/user/viewprofilepage/user-id/765608) Logged email in HubSpot just works by BCCing the HubSpot address to log it to a contact. It doesn’t really “integrate” with the mailbox on a much deeper level than that. So if your sending date is different to the date the email event was created in HubSpot, HubSpot isn’t going to know this.

I’m definitely missing something though, where within the HubSpot UI are you seeing the different “sending date” and “creation date”?  
I would see creation date as when the contact was created, and sending date being when the email event happened. So hs\_timestamp should give the timestampe of when the email event was created, not the contact. I’m curious though where in the UI are you referring to seeing creation date and sending date? It might help me get you an answer!

---

<div class="post-metadata">

**Author:** ![mestopinalesb](https://avatars.discourse-cdn.com/v4/letter/m/f17d59/32.png) [@mestopinalesb](https://community.hubspot.com/u/mestopinalesb)\
**Post date:** [August 26, 2024, 6:40pm UTC](https://community.hubspot.com/t/get-logged-email-activity-date-via-api/115218/3 "2024-08-26T18:40:56Z")

</div>

Hi Tom, thanks for the reply… I am trying to get the contact activity through the API (notes, emails, calls, etc) as a timeline…

In the Hubspot UI (contact/activities/emails) I can add a logged email by clicking the “Log Email” button. I can select the contacted person, Date and Time, etc… in my case, the email was sent outside Hubspot last week, I want to record it now and set the Date and Time of last week when it was sent. So far everything works fine, in activities I see the logged email with the correct date from last week.

Similar to this use case, you can see the activity date is different from a creation date

 ![mestopialesb_0-1724697288967.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/0/6/06965762421386f8fede5ae295aa0192719843c7.png)

But I can’t get through the API the Date and Time I set before, only the created date (which is now). Any ideas?

Thanks!

---

<div class="post-metadata">

**Author:** ![Jim\_from\_Charik](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jim_from_charik/32/60913_2.png) [@Jim\_from\_Charik](https://community.hubspot.com/u/Jim_from_Charik)\
**Post date:** [August 29, 2024, 5:43pm UTC](https://community.hubspot.com/t/get-logged-email-activity-date-via-api/115218/4 "2024-08-29T17:43:56Z")

</div>

Hello [@mestopiñalesb](https://community.hubspot.com/t5/user/viewprofilepage/user-id/765608) ,

here is the code you got when you use Hubspot API :

```lia-code-sample
{
 "id": "32022843104",
 "properties": {
 "hs_createdate": "2024-08-29T17:11:29.843Z",
 "hs_email_headers": null,
 "hs_email_html": "<div style=\"\" dir=\"auto\" data-top-level=\"true\"><p style=\"margin:0;\">test email</p></div>",
 "hs_lastmodifieddate": "2024-08-29T17:11:29.843Z",
 "hs_object_id": "32022843104",
 "hs_timestamp": "2024-08-15T16:30:00Z"
 },
 "createdAt": "2024-08-29T17:11:29.843Z",
 "updatedAt": "2024-08-29T17:11:29.843Z",
 "archived": false
}

```

- hs\_timestamp : is the timedate you sent the email in my example 15th of august
- createAt : is the timedate you create the logged email in my example 29th of august

 ![Jim_from_Charik_0-1724952886450.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/d/8/d8c971535f7a194a8a7165c166641eb36473f1f2.png)

To do so, use this call (ENGAGEMENT API) of course this is an example, you need to adapt it a bit by changing email\_id and your APIKEY :

- **url = “[https://api.hubapi.com/crm/v3/objects/emails/{email\_id}?properties=hs\_email\_headers](https://api.hubapi.com/crm/v3/objects/emails/%7Bemail_id%7D?properties=hs_email_headers), hs\_email\_html,hs\_timestamp”**

If you ask yourself, but how can I get the logged email id ?

- Use search engagement with filters like owners, contacts, companies, dates, …
- Use get email list and you will have the X last one : [https://api.hubapi.com/crm/v3/objects/emails?limit=10&archived=false](https://api.hubapi.com/crm/v3/objects/emails?limit=10&archived=false))

Will it be my first “SOLVED” ???
