Table of Contents
Get Opt-ins (Contacts) using Landbot API
In this article, we will configure the HTTP request needed to make subscribers for your WhatsApp.
- Go to the Growth tools section of your WhatsApp channel.

- Then select the Opt-in form.

- Generate an opt-in snippet by clicking on the "Create opt-in form" right-top button.

- 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.

- After the snippet is created, a URL field is populated. Copy the URL.

- Use that URL to make a POST request that will create the subscriber for a WhatsApp number.
curl --location --request POST 'https://messages.landbot.io/wa/W-1196-TCODZM8SIJ5CP1ZE/opt_in?phone=XXXXXXXXX' \
Replace the phone value with a valid number.
- 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:
https://messages.landbot.io/wa/W-1196-TCODZM8SIJ5CP1ZE/opt_in?phone=XXXXXXXXX&source=facebookleads