The API Request node makes HTTP requests to external web services and processes their responses.
The response is stored in a variable with the following properties:
Status: {{api.status}}
Response: {{api.body.field_name}}
HTTP Code: {{api.status_code}}
Request Configuration
api_request
Required
Configure the HTTP request including endpoint, method (GET/POST/PUT/PATCH/DELETE/HEAD/OPTIONS), path, query parameters, headers, and request body. All fields support Handlebars templates for dynamic values. Request body supports multiple formats: JSON, plain text, custom, URL-encoded form data, and multipart form data.
HTTP methods:
Request body formats:
Dynamic values with Handlebars:
All fields support Handlebars templates for inserting dynamic values from your flow:
Path: /users/{{user_id}}
Header: Authorization: Bearer {{api_token}}
Response Handling
response_handling
Configure how the API response should be processed. Choose between JSON parsing (automatically parses JSON responses) or plain text. Optionally include the raw response body alongside the parsed version by enabling 'includeRaw'.
Response types:
Include raw option:
When enabled, the raw response body is included alongside the parsed version as {{variable}}.raw
Error Handling
error_handling
Configure how the node handles errors.
Configuration options:
Use retries for transient errors like network issues. Use "continue on error" to implement fallback logic.
This node stores its output in a variable that can be referenced in subsequent nodes using the {{variable}} syntax.
{{variable}}.status
string
Response status: "success" (2xx responses), "error" (4xx/5xx responses), "failure" (network errors), or "exception" (configuration errors)
{{variable}}.body
object
Parsed response body (JSON object or plain text string depending on response handling type)
{{variable}}.headers
object
Response headers as key-value object
{{variable}}.status_code
number
HTTP status code (e.g., 200, 404, 500)
{{variable}}.timestamp
string
ISO 8601 timestamp of when the response was received
{{variable}}.raw
string
Raw response body as string (only present when includeRaw is enabled in response handling)
{{variable}}.error
string
Error message (only present when status is "error", "failure", or "exception")
output
error