ArtiBot JavaScript API


Getting Started features a number of ways for advanced users to customize their ArtiBot's behavior with the following JavaScript API.

All interaction with the ArtiBot Javascript API is handled through an API object that is written to the window when your ArtiBot snippet has loaded. This object will persist on your page, unless it is manually deleted.


ArtiBot Events

When your ArtiBot has loaded and is ready for use:

window.artibotApi.on('bot:ready', function () { console.log('bot ready'); });

Expand (opening) or collapse (closing) of ArtiBot occurs:

window.artibotApi.on('bot:expanded', function () { console.log('bot expanded'); });
window.artibotApi.on('bot:collapsed', function () { console.log('bot collapsed'); });

When your ArtiBot has started a chat:

window.artibotApi.on('chat:started', function () { console.log('chat started'); });

When a visitor sends a message:

window.artibotApi.on('chat:message-sent', function () { console.log('message sent'); });

When ArtiBot sends a message:

window.artibotApi.on('chat:message-received', function () { console.log('message received'); });

When the chat with ArtiBot has ended:

window.artibotApi.on('chat:ended', function () { console.log('chat ended'); });

ArtiBot Triggers

Expand (open) or collapse (close):


Show or hide the entire widget:


ArtiBot Properties

Get ArtiBot properties:


Set ArtiBot properties:

window.artibotApi.set('bot.bubbleMessage', 'My new message');


ArtiBot HTML

Custom ArtiBot Button:

<button class="artibot-button-expand">Chat Now!</button>