On this page
Sommatic Docs
Open portal

HTTP Client

Make HTTP Requests.

View as Markdown
Open in
Input and output Available io.http Version 1.0.0 Execution: async

Sends one HTTP request, optionally authenticated with a credential resolved on the server, and retries rate-limit, 5xx and transient network failures with exponential backoff.

How it works

  1. Resolves the config: expressions in url, headers and body are evaluated against the run.
  2. With connection_id, resolves the credential: prefixes config.baseUrl when url does not start with http, and adds one auth header from the secret, first match wins: token → Authorization: Bearer, username + password → Authorization: Basic, apiKey → header config.headerName (default x-api-key).
  3. Computes the retry policy (see http_retry_* and execution).
  4. Sends method to url with headers and body as the request data, over IPv4. Every status is accepted by the client and classified by the worker.
  5. 2xx leaves through out with { status, data, headers }. 429 and 5xx are retried while attempts remain, as are transient network errors; anything else leaves through error at once.

In a workflow

The node as it appears in a workflow file (draft_nodes[]), and the envelope of a successful run.

{
  "node_id": "node-call-erp",
  "label": "Call ERP",
  "operator_slug": "io.http",
  "operator_version": "1.0.0",
  "config": {
    "url": "https://api.example.com/orders/{{ $json.order_id }}",
    "method": "GET",
    "headers": {
      "accept": "application/json"
    },
    "connection_id": "pi-credential-xxxx",
    "http_retry_max_attempts": 3,
    "http_retry_backoff_ms": 1000
  }
}

Configuration

connection_id string Optional

Optional credential for the HTTP request. Accepts credentials of type `api-key`, `basic-auth`, `oauth2`, or `object` (custom headers / auth).

url string Required Accepts expressions

Full URL or Path if connection used.

method string Optional

Default: GET

Allowed values: GETPOSTPUTPATCHDELETE

headers object Optional Accepts expressions

HTTP headers as key-value pairs.

body object Optional Accepts expressions

JSON body. Supports {{expressions}}.

Supports the shared execution settings: retries (retryOnFail, maxTries, waitBetweenTries) and timeout.

Behaviour in the code

What the implementation does with these keys beyond what the schema says.

http_retry_max_attempts Read by the code, not declared
Not declared in the schema. Total number of attempts, including the first. Wins over execution. Values below 1 or not numeric become 1; capped at 5.
http_retry_backoff_ms Read by the code, not declared
Not declared. Base wait in ms (falls back to execution.waitBetweenTries, then 1000). Wait before retry n is base × 2^(n−1) plus 0–249 ms of jitter, capped by http_retry_max_wait_ms.
http_retry_max_wait_ms Read by the code, not declared
Not declared. Upper bound of a single wait, default 20000, never above 30000.
execution
Used only when http_retry_max_attempts is absent: retryOnFail: false gives 1 attempt; otherwise maxTries attempts (default 3). Without an execution block the node makes up to 3 attempts. timeout_ms, continueOnFail and alwaysOutputData are not applied by this worker.
method
When empty, the request is sent as GET.
connection_id
The secret must be an object with token, username + password or apiKey, as in basic-auth, oauth2 or object credentials. An api-key credential stored as a plain string adds no header. config.baseUrl and config.headerName come from the credential config.

Output ports

out default

The server answered with a 2xx status. data is the parsed response body (JSON when the server sends JSON, otherwise text).

Data
{
  "status": 200,
  "data": {
    "id": "ord_123",
    "status": "paid"
  },
  "headers": {
    "content-type": "application/json; charset=utf-8"
  }
}
error

A non-2xx status after the last attempt (data is { status, data, message }), or a network or setup failure (data is { error, response }).

Data
{
  "status": 404,
  "data": {
    "message": "Order not found"
  },
  "message": "HTTP Request Failed with status 404"
}

In expressions

What a later node can read from this node's output with $("HTTP Client").item.json.<path> (write your node's label instead of HTTP Client). Editor marks the paths the workflow editor suggests under Previous Nodes (the output contract); Worker marks the paths the worker really returns through out, from the output shown in Ports.

ExpressionEditorWorker
$("HTTP Client").item.json.statusnumber= 200
$("HTTP Client").item.json.headersobject= {…}
$("HTTP Client").item.json.dataobject= {…}Response Body
$("HTTP Client").item.json.data.idstringNot suggested by the editor= "ord_123"—
$("HTTP Client").item.json.data.statusstringNot suggested by the editor= "paid"—
$("HTTP Client").item.json.headers.content-typestringNot suggested by the editor= "application/json; charset=utf-8"—

— Worker: The worker returns it but the editor does not suggest it: write it by hand. Keys inside objects can depend on your data or configuration (for example one key per label).

Errors

Message Port Cause and fix
HTTP Request Failed with status <status> error The server answered non-2xx. 4xx other than 429 are never retried; 429 and 5xx reach this port only after the last attempt. data holds the response body.
<network error message> error The connection failed (for example connect ETIMEDOUT, getaddrinfo ENOTFOUND) on every attempt, or failed with a non-transient error. Check the URL and that the host is reachable from the orchestrator.
Failed to resolve connection <connection_id>: <detail> error The credential does not exist or this workflow cannot use it. Not retried.

Input contract

connection_id string Optional
url string Required
method string Optional
headers object Optional
body object Optional

Output contract

status number Optional
headers object Optional
data object Optional

Response Body

Contracts (JSON Schema)

The definition exactly as the orchestrator declares it. All is the whole *.definition.js; compare it with the sections above to spot differences between the documentation and the schema. Use it to validate a node before you publish.

{
  "slug": "io.http",
  "name": "HTTP Client",
  "category": "io",
  "version": "1.0.0",
  "description": "Make HTTP Requests.",
  "capabilities": [
    "http",
    "api",
    "rest"
  ],
  "config_schema": {
    "type": "object",
    "properties": {
      "connection_id": {
        "type": "string",
        "title": "HTTP Credential (optional)",
        "description": "Optional credential for the HTTP request. Accepts credentials of type `api-key`, `basic-auth`, `oauth2`, or `object` (custom headers / auth).",
        "ui_widget": "connection_picker",
        "ui_options": {
          "credential_types": [
            "api-key",
            "basic-auth",
            "oauth2",
            "object"
          ],
          "types": [
            "http"
          ]
        }
      },
      "url": {
        "type": "string",
        "title": "URL",
        "description": "Full URL or Path if connection used.",
        "format": "expression"
      },
      "method": {
        "type": "string",
        "title": "Method",
        "enum": [
          "GET",
          "POST",
          "PUT",
          "PATCH",
          "DELETE"
        ],
        "default": "GET"
      },
      "headers": {
        "type": "object",
        "title": "Headers",
        "description": "HTTP headers as key-value pairs.",
        "format": "expression"
      },
      "body": {
        "type": "object",
        "title": "Body",
        "description": "JSON body. Supports {{expressions}}.",
        "format": "expression"
      },
      "execution": {
        "type": "object",
        "title": "Execution Settings",
        "properties": {
          "alwaysOutputData": {
            "type": "boolean",
            "title": "Always Output Data",
            "description": "Always output data, even on error (if configured).",
            "default": false
          },
          "retryOnFail": {
            "type": "boolean",
            "title": "Retry On Fail",
            "description": "Retry the execution if it fails.",
            "default": false
          },
          "maxTries": {
            "type": "integer",
            "title": "Max Retries",
            "description": "Number of retries.",
            "default": 3,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "waitBetweenTries": {
            "type": "integer",
            "title": "Wait Between Retries (ms)",
            "default": 1000,
            "displayOptions": {
              "show": {
                "retryOnFail": [
                  true
                ]
              }
            }
          },
          "continueOnFail": {
            "type": "boolean",
            "title": "Continue On Fail",
            "description": "Do not crash workflow on error.",
            "default": false
          },
          "timeout_ms": {
            "type": "integer",
            "title": "Timeout (ms)",
            "description": "Max execution time for this node before it is killed, in milliseconds. Honored by long-running operators (e.g. OCR/extraction, inline code). Default 300000 (5 min).",
            "default": 300000
          }
        }
      }
    },
    "required": [
      "url"
    ]
  },
  "input_contract_schema": {
    "type": "object",
    "properties": {
      "connection_id": {
        "type": "string"
      },
      "url": {
        "type": "string"
      },
      "method": {
        "type": "string"
      },
      "headers": {
        "type": "object"
      },
      "body": {
        "type": "object"
      }
    },
    "required": [
      "url"
    ]
  },
  "output_contract_schema": {
    "type": "object",
    "properties": {
      "status": {
        "type": "number"
      },
      "headers": {
        "type": "object"
      },
      "data": {
        "type": "object",
        "description": "Response Body"
      }
    }
  },
  "ports": [
    {
      "port_id": "out",
      "label": "Response",
      "description": "Successful HTTP response (2xx)",
      "is_default": true,
      "supports_condition": true
    },
    {
      "port_id": "error",
      "label": "Error",
      "description": "HTTP client_error (4xx) or server_error (5xx)",
      "is_default": false,
      "supports_condition": true
    }
  ],
  "execution_mode": "async",
  "required_resources": [],
  "compatible_worker_pools": [
    "standard-io",
    "high-throughput-io"
  ],
  "tags": [
    "api",
    "rest"
  ],
  "is_stateful": false,
  "publisher": {
    "identity": "org_link_loom",
    "profile": {
      "name": "Link Loom",
      "verified": true,
      "url": "https://me.veripass.com/link-loom",
      "logo_url": null
    }
  }
}

Execution

Execution
async
Stateful
No
Retries (retryOnFail)
Yes
Credentials
Resolved on the server from connection_id; the secret never reaches the workflow.
Capabilities
httpapirest
Tags
apirest

Notes and limits

  • Retried statuses: 429 and 500–599. Retried network errors: ETIMEDOUT, ECONNRESET, ECONNREFUSED, ECONNABORTED, ENOTFOUND, EAI_AGAIN, EPIPE, ENETUNREACH, EHOSTUNREACH, and any error whose message contains "timeout".
  • Retries resend the same request: make non-idempotent calls (POST, PATCH) safe to repeat, or set http_retry_max_attempts: 1.
  • The request itself has no timeout; a server that never answers keeps the node waiting.
  • Connections are forced to IPv4 and are not kept alive between runs.

Reviewed against the orchestrator code · 31e874b · 2026-11-26

Install agent tools

Give your coding agent the official Sommatic AI docs: skills, the docs MCP server and Markdown pages, so it never has to scrape the site.

Skills only. They do not update by themselves; run it again to refresh.

npx skills add https://docs.sommatic.ai
How agents read these docs