# BUG upload files date

**URL:** <https://community.hubspot.com/t/bug-upload-files-date/124081>\
**Category:** APIs & Integrations\
**Tags:** email\
**Created:** [January 16, 2025, 10:18am UTC](https://community.hubspot.com/t/bug-upload-files-date/124081 "2025-01-16T10:18:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AMrb](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@AMrb](https://community.hubspot.com/u/AMrb)\
**Post date:** [January 16, 2025, 10:18am UTC](https://community.hubspot.com/t/bug-upload-files-date/124081/1 "2025-01-16T10:18:08Z")

</div>

![AMrb_0-1737022458110.png](https://d2qpr2jzcazej7.cloudfront.net/original/2X/a/a7da589bec1b3b238788265ceaff5a137dd1a3cf.png)

uploading a file via api shows a classic 1970, so it seems Hubspot fails to set “now” date on creation date of uploaded file.

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 16, 2025, 6:30pm UTC](https://community.hubspot.com/t/bug-upload-files-date/124081/2 "2025-01-16T18:30:01Z")

</div>

Hi there! Can you share an example of your requests for creating the note and for the association? I did a basic test using my dev portal and a test contact and was able to:

- Upload a file (to be saved as an attachment on an object record)
- Add the file to a Note
- Add the Note to an object record

One thing to note about Notes is the date you are showing in your screenshot corresponds to the

`hs_timestamp` property used when you _ **create** _ the Note, not when the Note is _ **associated** _ to an object record. You can verify this by adjusting the ISO timestamp value when you create a Note and then associating the note to your object record (Contact in this case)

**Example:**  **Note with File**

Request

`POST https://api.hubapi.com/crm/v3/objects/notes`

Body

```lia-code-sample
{
 "properties": {
 "hs_timestamp": "2025-01-15T18:00:00.000Z",
 "hs_note_body": "",
 "hubspot_owner_id": "198670650",
 "hs_attachment_ids": "92107510025"
 }
}

```

Response

```lia-code-sample
{
 "id": "69287718287",
 "properties": {
 "hs_all_accessible_team_ids": "12073943",
 "hs_all_owner_ids": "198670650",
 "hs_all_team_ids": "12073943",
 "hs_attachment_ids": "92107510025",
 "hs_createdate": "2025-01-16T18:11:45.457Z",
 "hs_lastmodifieddate": "2025-01-16T18:11:45.457Z",
 "hs_note_body": null,
 "hs_object_id": "69287718287",
 "hs_object_source": "INTEGRATION",
 "hs_object_source_id": "959085",
 "hs_object_source_label": "INTEGRATION",
 "hs_timestamp": "2025-01-15T18:00:00Z",
 "hs_user_ids_of_all_owners": "10233975",
 "hubspot_owner_assigneddate": "2025-01-16T18:11:45.457Z",
 "hubspot_owner_id": "198670650",
 "hubspot_team_id": "12073943"
 },
 "createdAt": "2025-01-16T18:11:45.457Z",
 "updatedAt": "2025-01-16T18:11:45.457Z",
 "archived": false
}​

```

**Associate Note to Object**

Request

`PUT https://api.hubapi.com/crm/v4/objects/note/69287718287/associations/contact/801`

Body

```lia-code-sample
[
 {
 "associationCategory": "HUBSPOT_DEFINED",
 "associationTypeId": 202
 }
]

```

Response

```lia-code-sample
{
 "fromObjectTypeId": "0-46",
 "fromObjectId": 69287718287,
 "toObjectTypeId": "0-1",
 "toObjectId": 801,
 "labels": []
}​

```

Screenshot of date

 ![CleanShot 2025-01-16 at 11.17.44@2x.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/3/a/3aea083ef71004316fca11493cfad1cc17a0c315.png)

To check:

- the timestamp you are sending when creating the note
- running a quick test with a few different values for the `hs_timestamp` property when creating a Note to fully understand how the API behaves in this case

In summary, this endpoint is working as designed, but possibly not as you are expecting it to work.

Have fun testing! — Jaycee

---

<div class="post-metadata">

**Author:** ![AMrb](https://avatars.discourse-cdn.com/v4/letter/a/7993a0/32.png) [@AMrb](https://community.hubspot.com/u/AMrb)\
**Post date:** [January 17, 2025, 8:35am UTC](https://community.hubspot.com/t/bug-upload-files-date/124081/3 "2025-01-17T08:35:08Z")

</div>

hi,  
checked your suggestion.

 ![AMrb_0-1737102811515.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/1/e1abb2e85ad2f6d5265b6fab05bfe1a856d203bd.png)

setting timestamp in milliseconds make a difference.  
setting UTC solved  
need to understand why timestamp is not registered.  
we can close here  
cheers
