Hey Jaycee,
Thanks for replying, I really appreciate it!
My POST code in c#
var client = new RestClient("https://api.hubapi.com/crm/v3/objects/notes");
var request = new RestRequest(Method.POST);
request.AddHeader("accept", "application/json");
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "Bearer MY-PRIVATE-API-KEY");
request.AddParameter("application/json", "{\"properties\":{\"hs_timestamp\":\"2022-04-06T03:30:17.883Z\",\"hs_note_body\":\"Spoke with decision maker john\",\"hubspot_owner_id\":\"84170060\",\"hs_attachment_ids\":\"12828617560\"},\"associations\":[{\"to\":{\"id\":\"301\"}}]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
In the above;
hubspot_owner_id - is My owner id
hs_attachment_ids - is the ID of the deal im trying to attach the note to
associations - set to 301 (I’ve tried all different numbers here I dont understand what it wants and suspect this is what is breaking it)
The response
HTTP 201
{
"id": "33349843569",
"properties": {
"hs_all_accessible_team_ids": "4205462;4205463;4205483;4205484;4205489;4260969;4261057",
"hs_all_owner_ids": "84170060",
"hs_all_team_ids": "4205463",
"hs_attachment_ids": "12828617560",
"hs_body_preview": "Spoke with decision maker john",
"hs_body_preview_html": "<html>\n <head></head>\n <body>\n Spoke with decision maker john\n </body>\n</html>",
"hs_body_preview_is_truncated": "false",
"hs_createdate": "2023-04-05T23:57:21.967Z",
"hs_lastmodifieddate": "2023-04-05T23:57:21.967Z",
"hs_note_body": "Spoke with decision maker john",
"hs_object_id": "33349843569",
"hs_timestamp": "2022-04-06T03:30:17.883Z",
"hs_user_ids_of_all_owners": "25161443",
"hubspot_owner_assigneddate": "2023-04-05T23:57:21.967Z",
"hubspot_owner_id": "84170060",
"hubspot_team_id": "4205463"
},
"createdAt": "2023-04-05T23:57:21.967Z",
"updatedAt": "2023-04-05T23:57:21.967Z",
"archived": false
}
When I go to deal 12828617560 in hubspot, there is no record of the note.
Any help would be great. Thanks again, Jaycee.
Keegan