Msg91 Help Doc
Hello Contact Center
ChatBots in Hello
MSG91 Bot
Connections

Connections

The connection card contains the API node. Let’s understand how can one setup the API in the MSG91 bot.

The API Node allows seamless integration with third-party services directly from your chatbot flow. This is useful for pulling data, submitting information, verifying user inputs, and much more — all without leaving the chatbot environment.


📌 What is the API Node?

The API Node enables your chatbot to make external API calls. You can:

  • Import a cURL command directly.

  • Or, manually configure the request by adding:

    • URL

    • HTTP Method (GET, POST, PUT, PATCH, DELETE)

    • Headers

    • Query Parameters

    • Request Body (in JSON, FormData, etc.)

  • Capture the API Response and store values in Custom Variables for use in later steps.

    Screenshot 2025-06-09 6.29.36 PM.png


🛠 How to Use the API Node

1. Add an API Node

  • From your bot flow, drag and drop the API Node.

  • Click to configure it.

2. Choose Your Setup Method

You can either:

  • 🔄 Import cURL Command
    Paste the cURL request copied from any API documentation or Postman. The system will auto-fill all necessary fields.

    OR

  • ✍️ Manually Configure API

    • URL: Enter the endpoint.

    • Method: Select the HTTP method (GET/POST/etc.).

    • Headers: Key-value pairs (e.g., Authorization: Bearer <token>).

    • Query Parameters (optional): Add parameters like ?user_id=123.

    • Request Body (optional): Enter payload in JSON or form format.

3. Test the API Call

  • Click "Get Response" to test the call.

  • Review the response.

  • Click on Save

4. Map Response to Custom Variables

  • Select parts of the response you want to store.

  • Assign them to custom_variables like user_name or order_status.

5. Connect Next Steps

  • Use conditions or message cards based on API response.

  • Proceed with further actions like displaying info, asking for next steps, or submitting another request.


🔄 Example Use Cases

🛍 E-Commerce Bot

  • Fetch product details or inventory availability.

  • Place an order and fetch order confirmation.

🔧 Technical Support Bot

  • Validate device warranty using serial number.

  • Create a ticket via CRM integration.

📦 Logistics Bot

  • Track shipment using a tracking number.

  • Pull delivery status updates from third-party APIs.

🏦 Banking/Finance Bot

  • Fetch account balance or transaction history.

  • Submit loan or credit card application details.


💡 Pro Tips

  • Always test your API with real data before going live.

  • Use error handling by checking for failed responses and guiding the user accordingly.

  • Store frequently accessed API responses in variables to reduce repeated calls.


❓ Need Help?

If you're unsure how to structure your request or parse the response, reach out to our support team at

[email protected]

. We're here to help!

API Node Integration Guide
Jun 9, 2025
Prev