how to create messages via api belonging the contact ,just created via api as well?
Hello
I researched engagements api.
I created contact from apis and can be able to view in hubspot, ver well.
my aim is , I want to create message(s) based on that contact.
before creating message, I think, I have to create thread. after that, I have to create messages belonging that thread. but thread does not have userId(s) .
I am little bit confused with the architecture.
could you tell me the right way to have api(s) to create the messages for the contact I have just created?
Hi @TKucur , happy to try and help here. In your original message's error response I am seeing it state "INVALID_AUTHENTICATION". Since you're using the hapikey in your URL request, this is referring to that key being invalid. I would first recommend following the instructions in this developer documentation to migrate your script away from using hapikeys, and instead use Private Apps. HubSpot is sunsetting the ability to use hapikeys as authentication at the end of this month.
Once you've replaced the authentication method, double check that you've also included a JSON Body with your HTTP request, stating the association type and definition