API to creating new thread

Hi!

In my website (using HubSpot chat widget), I have a table of orders, each row has a button. When user click that button, I want to open the chat widget and create a new thread with the name of the thread is the orderID. Is there any endpoint or any way for me to do that?

Hey @Zopi :waving_hand: and welcome, we are delighted to have you here!
Great question, thanks for asking the HubSpot Community!
Here are some resources that you might want to look at:
- Conversations SDK
- Conversations inbox and messages APIs
- Custom channels
Now let’s consult our Top Experts: Hi @Anton, @sylvain_tirreau and @tmcginnis do you have suggestions to help @Zopi, please?
Thanks so much and have a wonderful day!
Bérangère

Hi @Zopi , this is a super common request, and the short answer is: with the standard HubSpot chat widget, you can’t programmatically “start a brand-new thread” and set its subject to an orderID.

The widget decides whether to continue an existing conversation based on the visitor’s chat cookies and session state, and HubSpot doesn’t expose an endpoint that lets you force-create a separate conversation thread inside the built-in website chat channel on demand.

What you can do reliably is open the widget and pass context around the click, then make the first message include the order ID so it’s visible to agents. The Chat Widget SDK lets you control opening the widget and react to events, but it’s not designed to create or rename threads the way you’re describing (Accounts Dashboard | HubSpot )

If you truly need “one order click = one distinct thread”, the path in HubSpot land is usually a Custom Channel, where your external system is the channel and you create threads/messages via API. That’s a heavier lift (it’s an app, not just a quick endpoint call), but it’s the only model where you fully control thread creation and metadata (Accounts Dashboard | HubSpot )

Hope this helps.