Feature
The JavaScript API
The widget is not a black box. Your page can tell it what to do, and it tells your page what happened.
Drive it from your page
Open a named room, start a support chat, or set the visitor’s identity from your own buttons and your own flow.
Listen to it
The widget emits events your page can subscribe to, so a chat opening can also trigger whatever else your page needs to do.
And a REST API
For work that belongs on your server rather than in the browser, the REST API covers sites, users and rooms.
The JavaScript API is on every plan. The REST API is on Wow and above.
How it works
Driving the widget from your own code
The widget publishes an object
Once loaded it exposes a small API on the page. Open the panel, open a particular room, start a private conversation, set the language, sign somebody in or out — from your own buttons and your own events.
It tells you what happened
Callbacks fire when a message arrives in a conversation that is not on screen, when the panel is opened, and when the widget is ready. Sites use the first to put their own unread badge in their own header.
The REST API is the other half
The JavaScript API is for the page. The REST API is for your server: create and remove rooms, read history, manage membership. An event site opens a room per session from its own scheduler this way.
Keys are separate from the signing key
An API key is not your SSO signing key. They are issued and revoked independently, so handing a contractor API access does not hand them the ability to impersonate your members.
Questions
- Which plans have the REST API?
- The higher tiers. The JavaScript API on the page is available to every plan, because it is how the widget is opened from your own button and that is not a premium feature.
- Is there a rate limit?
- Yes, and it answers with a clear status rather than failing silently, so a script that goes wrong is obvious rather than mysterious.
- Can I rotate an API key?
- Yes, and you should be able to without a support conversation. Keys are hashed at rest, so nobody at Flyzoo can read yours back to you — a lost key is replaced rather than recovered.
- Will the API change under me?
- The existing methods and their names are a customer contract; sites have had them in production for years. Changes are additive.
Put a chat on your site this afternoon
One script tag before the closing body tag. Fourteen days free, and no card until you decide.