Skip to content
Docs

HTTP request step: call any API

Call any API with GET, POST, PUT, PATCH or DELETE: headers, query and a JSON or form body built from your data. Timeouts, sizes, 4xx answers and retries.

Updated

HTTP request calls any API: a GET, POST, PUT, PATCH or DELETE with headers, a query and a body built from your data.

How to set it up

  1. Add an HTTP request step. Choose the Method and type the URL; data can go in the URL too.
  2. Add headers and query parameters as key/value fields.
  3. Choose the Body: key/value fields sent as JSON or as a form, or JSON (raw) to type the JSON yourself. In raw JSON, inserted data is escaped for you: inside quotes it becomes text, on its own it keeps its type, and missing data becomes null. It's checked to be valid JSON before sending.
  4. Optional: an API credentials connection holds your key encrypted and adds it to each request the way the API wants it: as a header (Authorization: Bearer …), as a query parameter (?api_key=…) or as Basic auth (a username and password). It wins over a header or parameter of the same name in the step, and its value is hidden in run history. A key typed straight into a header or query field is stored and shown as typed. When you rotate a key, Replace credentials on the Connections page swaps it on the same connection, so no step has to change.
  5. Test this step sends the request for real.

Output

status, statusText, headers and body, for later steps to use.

When a 404 is an answer, not a failure

A response of 400 or above fails the step. Some APIs answer 404 to say “no such customer”, which you may want to act on: turn on More options → Treat 4xx answers as a result. A 400 to 499 answer then comes back like any other, with its status and body, so a Branch can check Status is 404 and create the customer on its No path. 5xx answers still fail, and a 408, 425 or 429 is still retried.

Limits

  • 15 seconds per request; 1 MB for the request and 1 MB for the response.
  • Raw JSON up to 20,000 characters as written and 1 MB filled in.
  • Private and internal addresses are blocked.
  • A response of 400 or above fails the step (unless 4xx answers are treated as a result, above), so later steps never see an error response. The failure email tells you when an API is down.
  • Retries: GET, PUT and DELETE are retried after 30 seconds, 2 minutes and 10 minutes on network errors, timeouts and 408, 425, 429 or 5xx responses. POST and PATCH are retried only when the request certainly wasn't processed (never connected, or a 408, 425 or 429); after a timeout or a 5xx the run fails and asks you to check whether it went through, then re-run. Each POST or PATCH carries an Idempotency-Key header.