Tidio Widget SDK

Control the chat widget from your own JavaScript — on any plan

Tidio's Widget SDK is a JavaScript API that lets you programmatically interact with the Tidio chat widget embedded on your site. Unlike the REST API (which requires the Plus plan — contact sales for current pricing), the Widget SDK is available on all plans, including free.


What the SDK can do

The SDK exposes the tidioChatApi object on the window, giving you control over:


How to access it

The SDK becomes available after the Tidio script loads on your page. Since the script loads asynchronously, you need to wait for it:

document.addEventListener("tidioChat-ready", function () {
  // tidioChatApi is now available
  window.tidioChatApi.open();
});

If you're working in a single-page app (React, Vue, etc.), attach the event listener early in your app lifecycle — typically in a root component's mount hook.


Common use cases with examples

Open chat on button click

document.getElementById("help-btn").addEventListener("click", function () {
  window.tidioChatApi.open();
});

Identify a logged-in user

document.addEventListener("tidioChat-ready", function () {
  window.tidioChatApi.setVisitorData({
    distinct_id: "user_12345",
    email: "jane@example.com",
    name: "Jane Doe",
  });
});

Pass custom properties

window.tidioChatApi.setContactProperties({
  plan: "premium",
  signup_date: "2026-01-15",
  order_count: 12,
});

Trigger a specific Flow

window.tidioChatApi.trigger("welcome-returning-customer");

Listen for events

document.addEventListener("tidioChat-open", function () {
  console.log("Chat widget opened");
});

document.addEventListener("tidioChat-close", function () {
  console.log("Chat widget closed");
});

document.addEventListener("tidioChat-messageFromVisitor", function (data) {
  console.log("Visitor sent a message");
});

Hide the widget on specific pages

document.addEventListener("tidioChat-ready", function () {
  if (window.location.pathname.startsWith("/checkout")) {
    window.tidioChatApi.hide();
  }
});

Tips


Limitations


SDK vs. REST API

Feature Widget SDK REST API
Plan requirement All plans Plus (contact sales for pricing)
Runs where Browser (client-side) Server (backend)
Controls Chat widget Contacts, conversations, operators
Use case Frontend interactions Data sync, exports, integrations
Comparison of Widget SDK vs. REST API plan requirements and capabilities.

Most teams start with the SDK and only move to the REST API if they have backend integration requirements that the SDK can't cover.


More developer resources


Last updated: April 2026. Based on Tidio's developer documentation and SDK reference.