JavaScript Chat API Overview Follow

The JavaScript Chat API is a powerful tool you can use to customize Zendesk Chat for your website. For complete documentation, see

Here are the standard steps to use one of the APIs on your website.

Step 1: Choose an API

Pick out the API you want to use from our list at For example, here’s one for automatically setting the name and email address in the chat widget:

zopim api

Step 2: Customize the API

Modify the API action to suit your needs.

For example, you can modify the “setName” and “setEmail” fields to automatically pull information from your customer database and populate the visitor information in the chat box:



Step 2: Add the API action to your website

Browse to your website’s HTML code and find the place where you inserted the code for the Zendesk Chat widget.

Paste your customized API script code anywhere after the Zendesk Chat widget code:

zopim api


Step 3: Publish your page

Save the changes to the HTML code and publish your page.

The API script in this example will automatically fill in visitor information (with their name and email address) when they start a chat (provided they have already given you that information).


Got the hang of it? Now let’s explore some API tricks you can try out right now.

Have more questions? Submit a request

Please sign in to leave a comment.

Powered by Zendesk