1. Home
  2. Developers
  3. Verloop livechat APIs

Verloop livechat APIs

Start a particular recipe

Use the following script to set a particular recipe.

Verloop(function() {

Recipe id once set can not be changed for that session. If you are not setting any particular recipe, default recipe will be started upon opening the widget.

RecipeId can be found from the recipe edit url. For example :


Open the widget

Use the following script to open the widget.

Verloop(function() {

Note: Recipe can not be changed after the widget is opened for that session.

Close the widget

Use the following script to close the widget.

Verloop(function() {

Set user parameters

User parameters like name, email and phone number can be set via the API. The corresponding blocks from the recipe will be skipped if these parameters are set.

Verloop(function() {
        name: "<name_of_visitor>",
        email: "<email_of_visitor>",
        phone: "<phone_of_visitor>"

Set custom parameters

You can set custom parameters and their values.

Verloop(function() {
    this.setCustomField("key", "value", { scope: "user" });

The value of “scope” variable can be either “user” or “room”. These custom fields will also be sent to your server via the webhook block. Learn More

Was this article helpful?

Related Articles