About building live chat with custom UI

I have built an AI chatbot that can be installed to a website and that answeres based on website content.If user wants to chat with human from that site(if that site uses hubspot chat)Can anyone explain me how to intergrate hubspot chat with my chat widget? . UI should be my chat widget only but messages should be sent to hubspot. That means end user chats from my widget and customer support/agent of that site chats from hubspot UI

Hi @batman_003 and a big warm welcome to the HubSpot Community! :raising_hands:

Great question, thanks for asking!

I’m sharing this endpoint " Custom channels API guide (v3) - HubSpot docs " that might come in handy!

Also, I’d love to put you in touch with our Top Experts: Hi @Anton, @sylvain_tirreau and @zach_threadint do you have any tips to share with @batman_003, please?

Have a wonderful day and thanks so much! :orange_heart:

Bérangère

Hey

Would love to help on this as already built something very similar recently.

Let me know at [email]

Moderator note: The HubSpot Community is a public space. I have therefore edited your content for security & confidentiality reasons.

Hi @debojyoti.dev and welcome, we are delighted to have you here!

Thanks for your help and message !

The HubSpot Community is a shared space of connection and learning.

Help make the HubSpot Community a richer place by sharing your expertise here, on this public space please, so that other Community Members can get help too!

Thank you very much!

Bérangère

I would treat this as a custom channel integration, not as embedding HubSpot’s native chat UI inside your widget.

If your widget owns the visitor experience, keep one stable conversation/thread id on your side, identify the visitor before handoff, then send the messages into HubSpot through the Custom Channels API. Agent replies should come back to your widget through your channel/webhook layer, not by trying to control the HubSpot chat widget DOM.

A practical flow:

  1. Bot handles the first part of the conversation.
  2. When human handoff is needed, create or reuse the HubSpot conversation for that visitor.
  3. Push the transcript/context into the thread.
  4. Route future visitor messages to HubSpot and return agent replies to your widget.

If you only need a simple handoff, the cheaper option is to keep the HubSpot chat widget and pass bot context into HubSpot instead of replacing the UI.