Skip to main content

Overview

The Call API block sends HTTP requests to external APIs and returns the response data. Use it to integrate with third-party services, fetch data from your own backend, or connect to any RESTful API.

Configuration

Request Method

Select the HTTP method for your API request.

API Endpoint URL

Enter the complete URL of the API endpoint. Only HTTPS URLs are supported for security. Format: https://api.example.com/endpoint This field supports placeholders to build dynamic URLs:
HTTP URLs are not allowed. All API requests must use HTTPS for secure communication.

Request Headers

Add HTTP headers required by the API. Common headers include authentication tokens, content types, and API keys. Adding headers:
  1. Click “Add header”
  2. Enter the header name (e.g., Authorization)
  3. Enter the header value (e.g., Bearer {{api_token}})
Common headers: Headers support placeholders for dynamic values:

Query Parameters

Add URL query parameters that will be appended to the endpoint URL. Adding parameters:
  1. Click “Add query parameter”
  2. Enter the parameter name (e.g., page)
  3. Enter the parameter value (e.g., {{current.page_number}})
Example: This produces: https://api.example.com/items?limit=10&offset=0&sort=created_at

Request Body

For POST requests, provide the JSON payload to send. The body must be valid JSON format:
Use placeholders within the JSON to insert dynamic values from previous steps. The Content-Type header is automatically set to application/json when a body is provided.

Retry Attempts

Configure automatic retries for failed requests.
  • Minimum: 0 (no retries)
  • Maximum: 3 retries
  • Default: 0
When retries are enabled, failed requests are automatically retried with exponential backoff (increasing wait time between attempts). Use retries when:
  • The API occasionally returns temporary errors
  • Network issues may cause intermittent failures
  • Rate limiting may temporarily block requests

Output

The block returns the API response data. JSON responses are automatically parsed into objects.

Successful Response

For a successful API call returning JSON:
Accessing response data:
For array responses:
Accessing array data:

Error Response

When the API returns an error (4xx or 5xx status), the output contains error details:

Non-JSON Response

If the API returns non-JSON content, the raw text is returned as a string:

Security

The Call API block includes built-in security protections:
  • HTTPS Only: All requests must use secure HTTPS connections
  • SSL Verification: Server certificates are validated
  • Response Size Limit: Maximum 10MB response size
  • Request Timeout: 30-second timeout for all requests
  • Safe Redirects: Redirect URLs are validated before following

Best Practices

  • Store API keys securely and reference them using placeholders
  • Use appropriate retry settings for unreliable APIs
  • Check for error responses in subsequent steps before processing data
  • Set reasonable result limits in query parameters to avoid large responses
  • Test API calls with sample data before running production workflows
  • Use GET for reading data, POST for creating or modifying data

Common Use Cases


Example: Slack Notification

Send workflow results to a Slack channel: Method: POST URL: https://hooks.slack.com/services/xxx/yyy/zzz Body:

Example: Fetching Paginated Data

Retrieve data from a paginated API: Method: GET URL: https://api.example.com/items Query Parameters: Use with a Loop block to iterate through pages.

Troubleshooting


What’s Next

Now that you understand the Call API block: