Create Opt-ins (Subscribers) using Landbot API

Ana Updated by Ana

In this article, we will configure the HTTP request needed to make subscribers for your WhatsApp.

  1. Go to the Get opt-ins section of your WhatsApp channel.

  1. Generate an opt-in snippet by clicking on the "Create opt-in form" right-top button.
  1. You'll find a few options to customize it. You can choose, optionally, if after generating the subscriber you want to send a template. And also optionally, a bot to be launched. Consider that the bot will be launched automatically only after the first user input.

Once you've made those decisions, press the "Save & copy snippet" button.

  1. After the snippet is created, an URL field is populated. Copy the URL.

  1. Use that URL to make a POST request that will create the subscriber for a WhatsApp number.
curl --location --request POST '' \
--header 'Authorization: Token XXXXXXXXXXXXXXXXXXXXXXXXXXXXX' \
--header 'Content-Type: application/json'

Replace the phone value with a valid number and get your API Token from the Settings section of the app.

  1. Optionally, you can add parameters to the URL. For example, in the case of tracking purposes you add a source param that includes the origin of your leads:

How did we do?


Opt-In block for WhatsApp πŸš€