APIs & Integrations

jpaullewer
Member

API - Adding note not showing up

SOLVE

I got the following success message, but can't find the test note I created under the contact:

errors: , status_code: 200array(4) { ["engagement"]=> array(8) { ["id"]=> int(1335691001) ["portalId"]=> int(2427637) ["active"]=> bool(true) ["createdAt"]=> float(1539364444441) ["lastUpdated"]=> float(1539364444441) ["ownerId"]=> int(0) ["type"]=> string(4) "NOTE" ["timestamp"]=> int(1539364444) } ["associations"]=> array(8) { ["contactIds"]=> array(1) { [0]=> int(4472251) } ["companyIds"]=> array(1) { [0]=> int(183147166) } ["dealIds"]=> array(0) { } ["ownerIds"]=> array(0) { } ["workflowIds"]=> array(0) { } ["ticketIds"]=> array(0) { } ["contentIds"]=> array(0) { } ["quoteIds"]=> array(0) { } } ["attachments"]=> array(0) { } ["metadata"]=> array(1) { ["body"]=> string(18) "note body from PHP" } }

I made sure to add the association. Thoughts?

0 Upvotes
1 Accepted solution
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

API - Adding note not showing up

SOLVE

UNIX Epoch time, which starts on January 1, 1970.

Isaac Takushi

Associate Certification Manager

View solution in original post

0 Upvotes
7 Replies 7
jpaullewer
Member

API - Adding note not showing up

SOLVE

Thank you. I'm trying to get it using PHP and can't nail down the correct date. I'll see if there are any other threads that address this. Thank you.

0 Upvotes
IsaacTakushi
Solution
HubSpot Employee
HubSpot Employee

API - Adding note not showing up

SOLVE

UNIX Epoch time, which starts on January 1, 1970.

Isaac Takushi

Associate Certification Manager
0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

API - Adding note not showing up

SOLVE

Hey @jpaullewer,

Happy to clarify. Make sure your timestamps are in milliseconds, per this documentation.

Isaac Takushi

Associate Certification Manager
0 Upvotes
jpaullewer
Member

API - Adding note not showing up

SOLVE

I saw that, but based on what date?

0 Upvotes
jpaullewer
Member

API - Adding note not showing up

SOLVE

Please disregard this issue. I'm not using the correct timestamp format. I'll have to look into how to format those when doing an import. I could use some help with that though...

0 Upvotes
IsaacTakushi
HubSpot Employee
HubSpot Employee

API - Adding note not showing up

SOLVE

Hi @jpaullewer,

You included the timestamp value 1539364444 which logged the notes in 1970:

Isaac Takushi

Associate Certification Manager
0 Upvotes
jpaullewer
Member

API - Adding note not showing up

SOLVE

What format should I use then? I'm doing everything through PHP

$today=new DateTime();
$currentTimeStamp=$today->getTimestamp();

0 Upvotes