# Create a Note with the V3

**URL:** <https://community.hubspot.com/t/create-a-note-with-the-v3/66968>\
**Category:** APIs & Integrations\
**Created:** [October 12, 2022, 3:49pm UTC](https://community.hubspot.com/t/create-a-note-with-the-v3/66968 "2022-10-12T15:49:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ph\_alti\_trading](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ph_alti_trading/32/191450_2.png) [@ph\_alti\_trading](https://community.hubspot.com/u/ph_alti_trading)\
**Post date:** [October 12, 2022, 3:49pm UTC](https://community.hubspot.com/t/create-a-note-with-the-v3/66968/1 "2022-10-12T15:49:41Z")

</div>

Hello Ladies & Gentleman.  
I’m stuck in creating a note via the API :

```lia-code-sample
<?php

define( 'HUBSPOT_BASE_URL', 'https://api.hubapi.com' );
define( 'HUSPOT_ACCESS_TOKEN', ' ****-***** - ********' );

require_once "./vendor/autoload.php";

$client = \HubSpot\Factory::createWithAccessToken(HUSPOT_ACCESS_TOKEN);

$noteProperties = [
 "properties" => [
 "hs_timestamp" => "2022-09-19T03:30:17.883Z",
 "hs_note_body" => "Spoke with decision maker john",
 "hubspot_owner_id" => "1234567"
 ] 
];

$noteInput = new \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectInput($noteProperties);

$note = $hubspot->crm()->objects()->notes()->basicApi()->create($noteInput);

var_dump( $note );

?>

```

I guess it’s working (result 201 or 200 in the log) but the returned result looks like this :

```lia-code-sample
object(HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectInput)#17 (1) {
 ["container":protected]=>
 array(1) {
 ["properties"]=>
 array(3) {
 ["hs_timestamp"]=>
 string(24) "2022-09-19T03:30:17.883Z"
 ["hs_note_body"]=>
 string(30) "Spoke with decision maker john"
 ["hubspot_owner_id"]=>
 string(8) "1234567"
 }
 }
}

```

The ID is missing 😁.

I need this ID in order to associate the note to a deal. I checked with different timestamp and different owner ids - yeah not owners ids not contact ids - 😉 but after one hour and half, it’s not working.

😮

While typing the message I’ve just understood I was dumping the $noteInput instead of the $note ! Damned 😂

Thank you for your support everyone, hope the snippet will help someone in the future ! 🤠

---

<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:** [October 12, 2022, 8:51pm UTC](https://community.hubspot.com/t/create-a-note-with-the-v3/66968/2 "2022-10-12T20:51:42Z")

</div>

Hey, [@ph\_alti\_trading](https://community.hubspot.com/t5/user/viewprofilepage/user-id/137533) 👋 To confirm, you found your mistake and added the solution? If so, please add a comment and I can mark it as solved ✅

Thank you! — Jaycee

---

<div class="post-metadata">

**Author:** ![ph\_alti\_trading](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ph_alti_trading/32/191450_2.png) [@ph\_alti\_trading](https://community.hubspot.com/u/ph_alti_trading)\
**Post date:** [October 13, 2022, 8:17am UTC](https://community.hubspot.com/t/create-a-note-with-the-v3/66968/3 "2022-10-13T08:17:51Z")

</div>

Yes [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074) I found my mistake while I was writing my message so I posted the solution anyway 😃 I tested it and the call to the API V3 is working !  
The variable set in the _var\_dump_ to debug was not the right one 😅…  
I guess next time I call it a day before pushing into the debug 😎
