Theme
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
| Property | Description | Default |
|---|---|---|
| Name | Display label for this API call (e.g., "Get Order Details"). | API Call |
| URL | The endpoint URL. Supports {{variable}} interpolation. | Empty |
| Method | HTTP method: GET, POST, PUT, PATCH, or DELETE. | GET |
| Headers | Key-value pairs for request headers (e.g., Content-Type: application/json). | Empty |
| Body | Request 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 |
API Call node config panel showing URL input field with variable interpolation, HTTP method dropdown, headers key-value editor, JSON body editor, and timeout setting
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:
| Property | Description | Default |
|---|---|---|
| Include Auth Token | Automatically include an authentication token in the request headers. | true |
| Auth Token Variable | The 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 Expression | Variable | Description |
|---|---|---|
$.data.order.status | order_status | Extract the order status |
$.data.order.estimated_delivery | delivery_date | Extract the delivery date |
$.data.order.items.length() | item_count | Count the number of items |
If no response mapping is configured, the entire parsed JSON response is stored in a single output variable.
Response 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
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:
| Handle | Description |
|---|---|
| Success | The request returned a 2xx status code |
| Error | The 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
| Handle | Direction | Description |
|---|---|---|
| Input | In | Receives execution from the previous node |
| Success | Out | Request completed successfully (2xx) |
| Error | Out | Request failed (timeout, network error, non-2xx status) |
