API
Call an HTTP URL with method, headers, query, and body.
Type
act.api Block Utility
Folder
basic/utilityChannels
Any
Pipe
Value
Scope
Any
API performs an HTTP request. URL, query keys, headers, and body fields can be literals or context variables. The response is written to the data pipe.
Configure
| Setting | Description |
|---|---|
| Method | GET, POST, PUT, PATCH, or DELETE |
| URL | Request address (required) |
| Query parameters | Key/value pairs appended to the URL |
| Headers | Key/value request headers |
| Content type | None, JSON, Form data, URL encoded, Text, or XML |
| JSON body format | For JSON: Object builder or Raw JSON (variables) |
| Body | Form rows, raw text/XML, or JSON — depending on Content type |
Handles
| Handle | Role |
|---|---|
| In (target) | Incoming connection |
| Out (source) | Continues after the response |
| Error | Catchable failures: private/loopback URL (LOOPBACK_URL_BLOCKED), invalid URL (INVALID_SERVER_URL), or request failure (API_REQUEST_FAILED) |
Connect Branch errors to Error to split those codes. Unlisted codes still go to Other.
Pipe schema
The next block reads this on the data pipe (pipe.value). The value is an object:
| Key | Type | Description |
|---|---|---|
status | number | HTTP status code |
data | any | Response body |
headers | object | Response headers (text values) |
Use Bind Pipe if you need to keep the response under a name while the next block still reads pipe.value.
Use case
- Call an internal or third-party HTTP API from a general or chat workflow.
- POST JSON built from
args.*or earlier blocks.