Skip to content

API Call Node

The API Call node makes an HTTP request to an external API and maps the response into session variables. Use it to look up data, create records, trigger actions, or integrate with any system that exposes a REST API.

When to Use

  • You need to fetch data from an external system (e.g., look up an order, check account status).
  • You want to create or update a record in a CRM, ticketing system, or database.
  • You need to trigger an action in a third-party service (e.g., send a notification, schedule an appointment).
  • You want full control over the HTTP request (method, headers, body, auth).

For reusable API integrations that can be shared across flows, consider using the Tool Call node instead.

Configuration

PropertyDescriptionDefault
NameDisplay label for this API call (e.g., "Get Order Details").API Call
URLThe endpoint URL. Supports {{variable}} interpolation.Empty
MethodHTTP method: GET, POST, PUT, PATCH, or DELETE.GET
HeadersKey-value pairs for request headers (e.g., Content-Type: application/json).Empty
BodyRequest body (for POST, PUT, PATCH). Supports {{variable}} interpolation in JSON templates.Empty
Timeout (ms)Maximum time to wait for a response before timing out.5000
imageAPI Call node config panel showing URL input field with variable interpolation, HTTP method dropdown, headers key-value editor, JSON body editor, and timeout setting
API Call configuration panel

URL with Variables

Use {{variable}} syntax to build dynamic URLs:

https://api.example.com/orders/{{order_id}}
https://api.example.com/users?email={{user_email}}&page={{page_number}}

Request Body

For POST and PUT requests, write the body as a JSON template:

json
{
  "customer_id": "{{customer_id}}",
  "subject": "{{ticket_subject}}",
  "description": "{{issue_description}}",
  "priority": "high"
}

Authentication

The API Call node supports automatic auth token injection:

PropertyDescriptionDefault
Include Auth TokenAutomatically include an authentication token in the request headers.true
Auth Token VariableThe session variable containing the token. The token is sent as a Bearer token in the Authorization header.auth_token

For APIs that use API keys, add the key directly in the Headers section:

X-API-Key: {{api_key}}

WARNING

Do not hard-code API keys or secrets in the node configuration. Store them as encrypted tenant settings or environment variables, and reference them via variables.

Response Mapping

Map fields from the API response into session variables using JSONPath expressions:

JSONPath ExpressionVariableDescription
$.data.order.statusorder_statusExtract the order status
$.data.order.estimated_deliverydelivery_dateExtract the delivery date
$.data.order.items.length()item_countCount the number of items

If no response mapping is configured, the entire parsed JSON response is stored in a single output variable.

imageResponse mapping section of the API Call config panel showing a table with JSONPath expression, variable name, and description columns, with example mappings for order status and delivery date
Response mapping with JSONPath expressions

TIP

Use JSONPath expressions to extract exactly the data you need. This keeps your session variables clean and makes downstream Condition nodes simpler.

Error Handling

The API Call node has two output handles:

HandleDescription
SuccessThe request returned a 2xx status code
ErrorThe request failed (network error, timeout, 4xx/5xx status code)

Connect the Error handle to a Message node that informs the user of the problem, or to a retry path.

Handles

HandleDirectionDescription
InputInReceives execution from the previous node
SuccessOutRequest completed successfully (2xx)
ErrorOutRequest failed (timeout, network error, non-2xx status)

OmniBots AI Bot Platform