Skip to main content

HTTP Request

Sends an HTTP request to any URL and outputs the response. This is the main way to talk to external APIs.

The step opens a full-screen configuration dialog with the tabs Params, Headers, Body, Auth and Options.

Request​

FieldRequiredDescription
MethodYesGET, POST, PUT, PATCH, DELETE, HEAD or OPTIONS
URLYesThe request URL. Only http and https are allowed. Supports expressions. With a connection that has a base URL, a path such as /user is enough (see Base URL)

cURL import​

Click cURL and paste a command (for example from browser DevTools or API docs). The method, URL, headers and body are filled in for you. Bodies that aren't JSON or form data (XML, plain text…) are kept as Raw text with their Content-Type.

Params and Headers​

Key/value rows. Each row has an Active toggle so you can switch it off without deleting it. Values take data from earlier steps with + Data (see Insert data) and can contain expressions, for example a header X-Customer with the value {{ $vars.customerId }}.

Content-Type is set automatically from the body type, so you rarely need to add it. For Form Data and URL Encoded bodies a manual Content-Type header is ignored (the body sets its own, including the multipart boundary).

Body​

TypeDescription
NoneNo body
Form Datamultipart/form-data. Each field is either text or a file: toggle the row to file mode and choose a file from an earlier step with + File
URL Encodedapplication/x-www-form-urlencoded key/value pairs
JSONSent as application/json. Build it from fields (see JSON body below), or click Edit as JSON to write it yourself. Expressions are resolved before sending
Raw textText sent exactly as written (XML, plain text, HTML, CSV…). Pick the Content type (Text, XML, HTML, CSV or Custom), which sets the Content-Type header. Insert data adds data from earlier steps at the cursor
FileThe request body is a file from an earlier step: choose it with + File. Its content type is used

A file can come from any step that outputs one: an HTTP Request with a file response, a Webhook trigger upload, Convert to File or File Storage.

JSON body​

With the JSON body type the body is a list of fields. Each field has a name, a type and a value:

TypeSent as
TextA JSON string. Type text and click + Data (or type {{) to insert data from an earlier step, like in any text field
NumberA JSON number, as typed. Anything that isn't a number is sent as text
True / falsetrue or false
Data as isA value from an earlier step, keeping its type: a number stays a number, a list a list, an object an object. Pick it with + Data
Group of fieldsA nested object: add its own fields with Add field
ListA JSON array: add its items with Add item
Empty (null)null

Fields without a name aren't sent. Edit as JSON shows the same body as JSON text (with {{ … }} where data is inserted); Back to fields returns to the fields. A body the fields can't show — not valid JSON, or a single {{ … }} that sends data from an earlier step as the whole body — opens as JSON and says why.

A list as the body. Some APIs take a list ([ … ]) rather than named fields, for example a batch of records. A stored list opens as list items (Item 1, Item 2…), each with a type and value like a field but without a name; add more with Add item. For a new, empty body, pick Send: a list of items above the fields.

Data as is is stored as {{ JSON.stringify(<expression> ?? null) }}, so text with quotes or line breaks is escaped correctly and a missing value is sent as null.

Auth​

OptionWhat is sent
NoneNothing
Bearer TokenAuthorization: Bearer <token>
BasicAuthorization: Basic base64(username:password)
API KeyA key name and value, sent as a Header (default) or as a Query parameter
Use ConnectionSign-in details from a saved connection are applied for you

Token, username, password and key fields accept expressions, so you can use {{ $secrets.API_KEY }}.

When a request authenticated by a connection gets 401 Unauthorized, Blokkio refreshes the connection's sign-in details (for OAuth2 connections) and retries the request once.

Only HTTP connections can be used here. Database, SFTP, IMAP and SMTP connections belong to their own steps and triggers; see Database, SFTP and email connections.

Base URL and relative paths​

Connections made from an app with a base URL, such as GitHub (https://api.github.com) or a custom app, let you type only the path. When you pick such a connection, the URL field shows the base URL as a non-editable prefix, and a new step's URL changes to /.

Base URLURL fieldRequest goes to
https://api.github.com/repos/acme/website/issueshttps://api.github.com/repos/acme/website/issues
https://api.example.com/v1/users/{{ $trigger.id }}https://api.example.com/v1/users/42
https://api.example.com/v1https://status.example.com/healthUsed as is (absolute URL)

A URL without a scheme is relative and is appended to the base URL, keeping its path (/users on https://api.example.com/v1 goes to /v1/users). An absolute URL is used unchanged, but the connection's allowed domains still apply. A relative URL without a connection that has a base URL fails with The URL '/users' is relative: select a connection with a base URL, or use an absolute URL.

Default headers from the connection​

If the connection's app defines default headers (GitHub, for example, sends Accept: application/vnd.github+json and X-GitHub-Api-Version: 2022-11-28), the Headers tab lists them read-only under From the connection. They are added to every request made with the connection. A header with the same name in Request Headers wins, so you can override a default for one step.

See Base URL and default headers for details.

Options​

OptionDefaultDescription
Timeout (seconds)30Per attempt, 1–300. A timed-out attempt counts as a failure and can be retried
Retries00–10 extra attempts on 408, 425, 429, 500, 502, 503, 504, network errors and timeouts
Retry delay (ms)1000Base delay, 0–60000. Doubles each attempt with ±20% jitter, capped at 60 s. A Retry-After header (seconds or HTTP date) is used instead when the server sends one
Max response size (MB)501–1024, up to your plan's largest file. A larger response fails the step. Responses over 10 MB are saved as a file
Response formatAuto-detectAuto-detect, JSON, Text or File (see below)
Never fail on non-2xxOffTreat every HTTP status as success and output it, instead of failing the step
Follow redirectsOnFollow up to 10 redirects. 303, and 301/302 after a POST, switch to GET without a body. Sign-in details are dropped when a redirect goes to a different host
Ignore SSL certificate errorsOffAccept invalid or self-signed certificates. Only use this for trusted internal services

Response format​

  • Auto-detect — application/json, text/json and any +json type (such as application/problem+json or application/vnd.api+json) are parsed as JSON. CSV is parsed into rows and XML into an object. Other text types are returned as a string. Anything else (images, PDFs, archives…) is returned as a file. Large row data: a CSV or NDJSON/JSON Lines response larger than 5 MB is returned as a file instead (NDJSON as a dataset with its row count, columns and first rows). Pass it to Parse CSV, a Loop or a Transform array map, which read it row by row, so big exports don't have to fit in memory. With pagination turned on, pages are always parsed in memory.
  • JSON — parse the body as JSON whatever the content type (falls back to text if it is not valid JSON).
  • Text — always return the body as a string.
  • File — always return the body as a file.

File responses up to 1 MB are kept inline. Larger ones are streamed to temporary storage and the output holds a file reference, so big downloads don't sit in memory. Later steps (another HTTP Request, File Storage, Parse CSV…) accept either form.

Text answers (JSON, CSV, XML, plain text) larger than 10 MB are also saved as a file instead of being read into the output, whatever the response format. To use the data, pass the file to Parse CSV, Parse JSON or Parse XML: Parse CSV reads a stored file row by row, so even very large exports work. Downloads can be as large as Max response size (up to 1 GB); they count toward your workspace's storage while the run's files are kept.

Pagination​

Set Pagination to fetch several pages in one step. The items of every page are combined into items; responseBody holds the last page.

ModeHow the next page is requested
OffsetAdds offset (or your parameter name) = first offset + page × page size. Page size is required
Page numberAdds page (or your parameter name), starting at the first page (default 1) and counting up
Cursor from responseReads the next cursor from Next cursor path (e.g. meta.next_cursor) and sends it as cursor (or your parameter name)
Link headerFollows the rel="next" URL of the response's Link header
SettingDescription
Query parameterName of the offset / page / cursor parameter
First offset / First pageStart value. Defaults: offset 0, page 1
Page sizeItems per page. When set, paging stops at the first page with fewer items
Page size parameterOptional query parameter that receives the page size, e.g. limit
Items pathWhere the items are in each response, e.g. data. Empty = the whole body
Max pagesUpper bound, 1–1000 (default 10)

Paging also stops when a page has no items, the cursor is empty, there is no next link, or a page returns a non-2xx status.

Example — a cursor API returning { "data": [...], "meta": { "next_cursor": "abc" } }:

  • Pagination: Cursor from response
  • Query parameter: cursor
  • Next cursor path: meta.next_cursor
  • Items path: data

Output​

FieldTypeDescription
statusCodeNumberHTTP status code, e.g. 200
contentTypeStringMedia type of the response, e.g. application/json
headersObjectResponse headers, keys in lower case
responseBodyAnyParsed body (object, array, string or file). Empty for HEAD
itemsArrayPagination only: the items of all pages
pagesNumberPagination only: how many pages were fetched
{
"statusCode": 200,
"contentType": "application/json",
"headers": { "content-type": "application/json; charset=utf-8", "x-ratelimit-remaining": "59" },
"responseBody": { "id": 42, "name": "Ada" }
}

Use it downstream with expressions (replace HTTP Request with your step's name):

{{ $nodes['HTTP Request'].responseBody.name }}
{{ $nodes['HTTP Request'].headers['x-ratelimit-remaining'] }}

Errors​

A non-2xx response fails the step with a message such as HTTP 404 Not Found: {"error":"…"} (the first 500 characters of the body). Network errors, timeouts, an oversized response or an invalid configuration fail the step too. To handle failures:

  • turn on Never fail on non-2xx and branch on statusCode with an If / Else step,
  • tick Continue workflow on error at the bottom of the dialog to carry on down the normal path (check {{ $status['HTTP Request'].isSuccess }} downstream), or
  • use the step's error port or step-level retries.

Network protection​

Requests are checked against Blokkio's outbound network policy. Targets that resolve to private or internal addresses — localhost/loopback, private ranges such as 10.0.0.0/8 and 192.168.0.0/16, link-local, cloud metadata endpoints such as 169.254.169.254, and multicast — are refused, and every redirect hop is checked again. Use public URLs for the services you call.