Last Updated : 11 Apr 2026
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.
What You Can Achieve:
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.
How It Works: The Technical Foundation
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).
In This Guide, You Will Learn:
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.
Why It's a Game-Changer for Your Business:
✅ 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 StackIntegrate with thousands of apps through platforms likeZapierorMake, 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.
Part 1: How to Connect an External API in BotSailor
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.
Before You Begin: Prerequisites
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.
Step 1: Access HTTP API Settings
- Go to Integrations → HTTP API
- Choose a platform, e.g., WhatsApp HTTP API
Step 2: Click “Create” to Add a New API
Step 3: Copy a Test Subscriber ID
- Go to WhatsApp → Subscriber Manager
- Copy an existing subscriber ID for testing
Step 4: Generate API Key from Brevo
- Log in to Brevo
- Go to SMTP & API → API Keys → Generate a New Key
Step 5: Fill API Connection Details in BotSailor
- Name: Brevo Contact Add
- Method: POST
- URL: https://api.brevo.com/v3/contacts
- Test Subscriber ID: paste your copied ID
Header Data:
Key | Type | Value |
Content-Type | Static Value | application/json |
api-key | Static Value | xkeysib-XXXXXXXX... |
Step 6: Set Request Body (JSON) & Verify
{
"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.
Step 7: Save the API
Once verified, click Save API — ready to use in flows or broadcasts.
Part 2: Use HTTP API in Flow Builder (Automation)
After connecting the API, you can use it in chatbot flows. Here's how to trigger an external API from a WhatsApp conversation.
Step 1: Open Flow Builder
- Go to WhatsApp → Bot Manager
- Choose your bot and go to Bot Reply → Change Settings
- Click Create to start a new flow
Step 2: Add Input Collection
- Use User Input Flow to ask for an email address
- Set input type as Email
Step 3: Add HTTP API Block
- Drag the HTTP API block after input
- Select your saved API (e.g., “Brevo Contact Add”)
- Add a confirmation message block
Step 4: Test the Flow
- Send the keyword (e.g., sendbrevo) via WhatsApp
- Submit an email address
- BotSailor will respond and trigger the external API
Step 5: Confirm External Submission
- Check your external system (e.g., Brevo) for the new contact
Tips for Smooth API Integration
To ensure your API integrations are reliable, secure, and easy to manage, follow these five best practices.
1. Test Rigorously with Real Data
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.
2. The Devil is in the Details: Double-Check Everything
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://vshttps://Correct HTTP Method (
POST,GET, etc.)Spelling of header keys (e.g.,
Content-Typeis case-sensitive).
3. Name Your APIs for "Future You"
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 ContactGoogleSheet - Log SaleShopify - Get Order Status
4. Become a Detective: Monitor Your API Logs
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) or401 Unauthorized(usually an issue with your API key).
5. Treat API Keys Like Cash: Keep Them Secure
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.
Frequently Asked Questions (FAQs)
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.
