For the complete documentation index, see llms.txt. This page is also available as Markdown.

API Call

The API Call action allows chatbot builders to connect Ownchat with external systems and APIs to send, retrieve, update, or delete data in real time.

This connection-based action helps businesses integrate chatbot workflows with:

  • CRMs

  • Payment systems

  • Order management systems

  • Inventory platforms

  • Third-party applications

  • Custom backend services

The walkthrough demonstrates configuring API methods, request URLs, headers, query parameters, JSON request bodies, response variables, and publishing the workflow.

When to Use API Call

Use the API Call action whenever your chatbot needs to communicate with an external server or service.

Common Use Cases

  • Creating customer orders

  • Retrieving product information

  • Updating CRM records

  • Fetching delivery status

  • Sending payment requests

  • Synchronizing chatbot data with external systems

Example Interaction

Bot: ✅ Your order has been placed successfully.

The chatbot sends the order details to an external API and receives a response in real time.

How to Add API Call

Follow these steps to add the API Call action to your bot workflow.

  1. Open Bot Builder

  2. Click the Add Node button

  3. Open the Connections tab

  4. Select API Call

  5. Configure the API request settings

  6. Configure the response storage variable

  7. Click Create

  8. Click Publish to deploy the workflow

The walkthrough demonstrates selecting the API Call action from the Connections section.

Accessing the Connections Section

To access the API Call action:

  1. Click Add Node

  1. Open the action selection panel

  2. Click the Connections tab

The walkthrough specifically notes:

Connection is used to link the bot to external services for real-time data and actions.

Selecting API Call

Inside the Connections tab:

  1. Locate API Call

  1. Click the action to open the configuration panel

The walkthrough describes the API Call action as:

API Call Action – to send requests to external APIs and get or update data in real time for your bot actions.

API Call Configuration

When configuring the API Call action, several fields must be completed.

Action Name

The Action Name identifies the API request workflow inside the bot builder.

This name is visible only within the workflow editor.

Example

Create Order API Update Customer API Get Product Details

The walkthrough demonstrates renaming the default action to:

API call

before saving the configuration.

HTTP Methods

The Method field defines the type of API request being performed.

Available methods shown in the walkthrough include:

  • GET

  • POST

  • PUT

  • PATCH

  • DELETE

GET Method

Used to retrieve data from the server.

Example

GET /products

The walkthrough specifically notes:

GET method is used to retrieve data from the server.

POST Method

Used to create new data on the server.

Example

POST /create-order

The walkthrough selects:

POST

as the active request method.

PUT Method

Used to fully update an existing resource.

Example

PUT /customer/101

PATCH Method

Used to partially update an existing resource.

Example

PATCH /customer/status

DELETE Method

Used to remove data from the server.

Example

DELETE /order/1001

URL

The URL field specifies the API endpoint where the request should be sent.

Example

https://api.example.com/create-order

The walkthrough specifically notes:

Enter the URL, which is the address where the bot sends the request to access or update data.

Content Type

The Content Type field defines the request payload format.

The walkthrough specifies:

JSON

as the mandatory content type selection.

Headers

The Headers section allows additional request information to be sent with the API request.

Headers are commonly used for:

  • Authentication

  • Content type validation

  • API access tokens

To configure:

  1. Enter the header key

  1. Enter the corresponding value

Example

Key: Content-Type Value: application/json

The walkthrough demonstrates configuring the Content-Type header.

Query Parameters

The Query Parameters section allows additional URL parameters to be sent with the request.

To configure:

  1. Enter the parameter key

  2. Enter the corresponding value

Example

store_id = 123456 source = Chatbot

The walkthrough demonstrates adding multiple query parameters to the API request.

Request Body

The Body section contains the API request payload in JSON format.

The walkthrough specifically notes:

The API Call body is used to define the action in JSON format.

Example JSON Body

{ "customer_name": "{{customer.name}}", "phone": "{{customer.phone}}", "order_item": "{{bot.selected_item}}", "quantity": "{{bot.quantity}}", "address": "{{bot.delivery_address}}" }

The walkthrough demonstrates dynamically inserting chatbot variables into the JSON request body.

Variable Type

The Variable Type field defines how the API response should be stored.

Available types shown include:

  • Object

  • Array

The walkthrough specifically selects:

Array

when the API response contains multiple items or values.

Store Response Variable

The Store Response Variable field defines where the API response should be saved.

To configure:

  1. Select an existing variable or

  2. Create a new variable

The walkthrough demonstrates creating:

order_response

as the API response variable.

Creating the API Call Action

After configuring all API request settings:

  1. Review the request configuration

  2. Click the Create button

The API Call node will now appear inside the workflow canvas.

Workflow Behavior

Once triggered, the API Call action:

  • Sends requests to external APIs

  • Retrieves or updates real-time data

  • Supports all major HTTP methods

  • Stores API responses dynamically

  • Enables third-party workflow integrations

The walkthrough demonstrates creating an order request and storing the response dynamically inside the chatbot workflow.

Example Workflow

Example Chatbot Workflow

Collect Order Details ↓ API Call ↓ Send Order Data to Server ↓ Receive API Response ↓ Send Confirmation Message

Example Interaction

Bot: Your order has been submitted successfully ✅ Order ID: 45872

The chatbot sends customer data to the API and receives a confirmation response.

Publishing the Bot Changes

After configuring the API Call workflow:

  1. Review the request configuration

  2. Click the Publish button

  3. Deploy the updated workflow to production

The walkthrough concludes by publishing the API-integrated chatbot workflow successfully.

Best Practices

Follow these recommendations when using API Call.

Use meaningful action names

Clearly identify the purpose of each API request.

Validate API endpoints

Ensure the API URL is correct and accessible.

Use proper HTTP methods

Choose GET, POST, PUT, PATCH, or DELETE appropriately.

Secure sensitive data

Avoid exposing API tokens or confidential credentials.

Test API responses before publishing

Verify that the chatbot handles successful and failed responses correctly.

Summary

The API Call action allows chatbot builders to connect Ownchat with external APIs and third-party systems in real time.

With API Call, you can:

  • Send and retrieve real-time data

  • Integrate external platforms and services

  • Use all major HTTP request methods

  • Send dynamic JSON request payloads

  • Store API responses in chatbot variables

This connection action helps businesses create powerful integrated chatbot workflows and real-time automation experiences within Ownchat

Last updated