I’m trying to create a note and attach it to a particular ticket via api. According to the documentation I’m making the following api call.
api.hubapi.com/crm/v3/objects/notes
request body
{
“properties”: {
“hs_attachment_ids”: “106842206053”,
“hs_note_body”: “Test create note via api”,
“hs_timestamp”: “2023-03-17T01:12:17.883Z”
},
“associations”: [
{
“to”: {
“id”: 1500392495
},
“types”: [
{
“associationCategory”: “HUBSPOT_DEFINED”,
“associationTypeId”: 227
}
]
}
]
}
I got the association type by doing following api call
api.hubapi.com/crm/v3/associations/Ticket/Note/types
I get following error
{
“status”: “error”,
“message”: “invalid from object type 0-46 for associations to be created. expected: 0-5”,
“correlationId”: “7fcb3284-4c02-46dd-926a-0713762e2bcf”,
“category”: “VALIDATION_ERROR”
}
What am I doing wrong here?