Break free from the limits of your chatbot. With BotSailor’s powerful HTTP API integration, you can connect your Messenger and WhatsApp bots to virtually any external application or service.
Imagine seamlessly syncing new leads to your CRM, updating Google Sheets in real-time, or triggering personalized email campaigns—all from within a single chatbot flow. This isn't just a technical feature; it's the key to building a truly automated and interconnected marketing and support ecosystem.
Automate Your Lead Funnel: Instantly send contact information gathered in your chatbot directly to your CRM or email platform like Brevo, HubSpot, or Mailchimp. No more manual data entry.
Streamline Data Management: Automatically log sales, customer inquiries, or survey results into a Google Sheet, creating a real-time database managed entirely by your bot.
Create Hyper-Personalized Experiences: Pull data from your e-commerce platform (Shopify, WooCommerce, etc.) to enrich user profiles. Greet customers by name, reference their order history, or offer personalized recommendations.
Trigger External Workflows: Connect to platforms like Zapier or Make to initiate complex processes in other apps based on a user's interaction.
At its core, the HTTP API integration allows BotSailor to "talk" to other web services using a universal language. It leverages standard RESTful API methods to securely send and receive information. You can configure these actions visually, without writing any backend code.
POST
: Send new data (e.g., create a new contact).
GET
: Retrieve existing data (e.g., fetch a customer's order status).
PUT
/ PATCH
: Update existing data (e.g., change a contact's tag).
DELETE
: Remove data (e.g., unsubscribe a user).
This documentation will provide a complete walkthrough, including:
How to configure an external API connection in BotSailor.
The steps to trigger API calls from inside your chatbot flows.
A practical, step-by-step example using the email platform Brevo.
Essential tips and frequently asked questions for building smooth and reliable automations.
✅ Automate Your Workflow & Eliminate Manual Entry Stop wasting time on data entry. Instantly sync new leads to CRMs like HubSpot, email lists like Brevo or Mailchimp, or log sales data directly into Google Sheets the moment it's collected.
✅ Create Truly Dynamic & Personalized Conversations This isn't just about sending data out; it's about bringing data in. Fetch a user's purchase history from your database to offer personalized recommendations, or check their subscription status to provide tailored support. This two-way data sync makes your bot dramatically smarter.
✅ Connect to Your Entire Tech Stack Integrate with thousands of apps through platforms like Zapier or Make, or connect directly to your company's internal systems. If it has an API, BotSailor can likely communicate with it, giving you ultimate flexibility.
✅ Build Powerful Automations, No Code Required The best part? All of this is configured through BotSailor’s visual Flow Builder. You can set up complex, real-time data integrations without writing a single line of backend code.
This guide, current as of July 2025, provides a step-by-step walkthrough for setting up an external HTTP API connection in BotSailor. We will use Brevo, a popular email marketing platform, as our practical example to demonstrate how to add a new contact from your chatbot.
To ensure a smooth setup, please have the following ready:
Your Brevo API Key:
Log in to your Brevo account.
Navigate to your profile menu, then select SMTP & API.
Click on the API Keys tab and use the Generate a New Key button.
Copy this key to a safe place; you will need it shortly.
A Test Subscriber ID from BotSailor:
In your BotSailor dashboard, go to WhatsApp → Subscriber Manager.
Find any existing subscriber and copy their Subscriber ID.
Why? This ID allows BotSailor to pull real data (like that user's email and name) to send a test request, confirming your connection works before you use it in a live flow.
Header Data:
Key |
Type |
Value |
Content-Type |
Static Value |
application/json |
api-key |
Static Value |
xkeysib-XXXXXXXX... |
{
"email": "#LEAD_USER_EMAIL#",
"attributes": {
"FIRSTNAME": "#LEAD_USER_FIRST_NAME#"
},
"listIds": [1],
"updateEnabled": true
}
Use dynamic variables such as:
#LEAD_USER_EMAIL#
#LEAD_USER_FIRST_NAME#
#LEAD_USER_CHAT_ID#
Click Verify Connection to test.
Once verified, click Save API — ready to use in flows or broadcasts.
After connecting the API, you can use it in chatbot flows. Here's how to trigger an external API from a WhatsApp conversation.
To ensure your API integrations are reliable, secure, and easy to manage, follow these five best practices.
Before you ever use an API connection in a live campaign, test it thoroughly. Using the "Verify Connection" feature with a real subscriber ID is crucial because it simulates a real-world scenario. This helps catch formatting issues that dummy data might miss.
Best Practice: After verifying, attach the API action to a test flow and run through it as a user. Did the lead show up in your CRM? Was the Google Sheet updated correctly? Confirm the end-to-end result.
The vast majority of API errors come from simple typos or copy-paste mistakes. A single missing character in an endpoint URL or an incorrect header key can cause the entire request to fail.
Best Practice: Always copy and paste values like URLs and authentication keys directly from the provider's official documentation. Pay close attention to details like:
http://
vs https://
Correct HTTP Method (POST
, GET
, etc.)
Spelling of header keys (e.g., Content-Type
is case-sensitive).
As you build more integrations, a list of generic names like "API 1" or "Test API" will become impossible to manage. Think of your future self who will have to debug an issue.
Best Practice: Adopt a clear and consistent naming convention from the start. A good format is [Platform] - [Action]
.
Brevo - Add Contact
GoogleSheet - Log Sale
Shopify - Get Order Status
API logs are the "black box recorder" for your automations. When an action fails, the logs are the first place you should look. They show you exactly what data BotSailor sent, what response it received from the external service, and why it failed.
Best Practice: Regularly check the API Logs in BotSailor, especially after launching a new flow. Look for common HTTP error codes like 400 Bad Request
(often a problem with your JSON) or 401 Unauthorized
(usually an issue with your API key).
An API key is not just a random string of text; it's a password that grants access to your account on another service, often linked directly to your billing.
Best Practice: Never share your API keys in public forums, screenshots, or downloadable chatbot templates. Store them securely using a password manager. If you ever suspect a key has been exposed, go to the provider's website and regenerate it immediately.
Can I use methods other than POST?
Yes. BotSailor supports GET, POST, PUT, and DELETE HTTP methods.
Can I update subscriber fields based on the response?
Absolutely. Use Response Mapping to sync returned data into BotSailor’s subscriber fields.
Is my API key stored securely?
Yes. API keys are encrypted and only shown once during setup.
Can I trigger the API after an event like order completion?
Yes. You can call APIs from form submits, catalog purchases, button clicks, and more.
What if the API call fails?
BotSailor will show the error during verification. It won’t save the integration until it passes.
Does this work for Messenger too?
Yes, the same Flow Builder can be used for both WhatsApp and Messenger bots.
Can I connect to Google Sheets or other platforms?
Yes. Any platform that supports HTTP requests can be integrated.