Add note to contact using API

Hello.

It isn’t easy to understand how to correctly build a request to create a note for contact.

We have this doc

https://developers.hubspot.com/docs/api/crm/notes?_ga=2.191268014.508886808.1703082886-818731064.1703082886

/crm/v3/objects/notes

but it described a lot of property.

We found opened ticket like it:

https://community.hubspot.com/t5/APIs-Integrations/Error-while-create-contact-note/m-p/758011

but this also doesn’t work for me correct

Can you help me form correct json what I need to send for create note for contact

Additional:

1) Contact id as example “12345” - I got it from the search request

2) In documentation we have :

{
“hs_note_body”: “Spoke with decision maker john”,
“hs_timestamp”: “2019-10-30T03:30:17.883Z”,
“hubspot_owner_id”: “11349275740” <--- what id it should be .. if I use Spring boot app what value i sould set (contact id not working for me)
}

3) Full

curl --request POST \
--url https://api.hubapi.com/crm/v3/objects/notes \
--header ‘authorization: Bearer YOUR_ACCESS_TOKEN’ \
--header ‘content-type: application/json’ \
--data ‘{
“properties”: {
“hs_note_body”: “some text”,
“hs_timestamp”: “2023-10-30T03:30:17.883Z”,
“hubspot_owner_id”: “11349275740” <<----- ?
},
“associations”: [
{
“to”: {
“id”: “101” <---- as I correctly understand it should be contact id
},
“types”: [
{
“associationCategory”: “HUBSPOT_DEFINED”,
“associationTypeId”: 2 <--- in some docs i find the contact association code is 201 but range for this field 0-1
}
]
}
]
}’

Pls, help me build the correct JSON to add some text as notes to particular contact by contact id ..

Hello.

It isn’t easy to understand how to correctly build a request to create a note for contact.

We have this doc

/crm/v3/objects/notes

but it described a lot of property.

We found opened ticket like it:

this

but this also doesn’t work for me correct

Pls, help me build the correct JSON to add some text as notes to particular contact by contact id?