Making requests with the HTTP Request node
🎯You'll be able to
Make GET and POST requests with the HTTP Request node, sending headers, query parameters and a JSON body, and read the reply status.
🏠The everyday picture
Filling in a courier booking form: you choose the service, write the address in the right boxes, attach your ID, and hand it over. The counter clerk gives you a receipt, or tells you what's missing.
📘What it really is
- The HTTP Request node can call almost any API. You set:
- method and URL;
- headers, such as
Content-Type: application/jsonand the auth header; - query parameters, the
?status=delivered&page=2part, usually for filtering; -
body, the JSON you send when creating or updating.
-
The reply has a status code and a body:
200 OK,201 Created,204 No Content: success;400 Bad Request,422 Unprocessable: your data has a problem;401 Unauthorized,403 Forbidden: sign-in or permission problem;404 Not Found: wrong URL or the record doesn't exist;-
429and5xx: limits or the provider's own problems (retry, as in DA6). -
Many API docs show a curl example. n8n can import curl commands into an HTTP Request node, which saves typing.
- Map values into the body with expressions, as in DA4, and check the exact field names and units the API expects.
📝A worked example
Creating a ShipFast shipment after an order is paid:
POST https://api.shipfast.example/v2/shipments
Headers: X-Api-Key: (from credentials) Content-Type: application/json
Body:
{
"reference": "{{ $json.order_id }}",
"name": "{{ $json.customer.name }}",
"phone": "{{ $json.customer.phone_e164 }}",
"pincode": "{{ $json.address.pincode }}",
"weight_grams": {{ $json.weight_grams }}
}
The first test returns 422 with "pincode must be 6 digits": the shop sent "110 001" with a space. You clean the pin code
in the mapping step, and the next test returns 201 Created with an AWB number, which the workflow saves to the order.
🌍Where it's used
- Shipping: booking pickups and tracking.
- Billing: creating invoices in tools without nodes.
- Internal tools: calling a company's own API.
- New endpoints in apps whose nodes don't support them yet.
📝Case scenario
A request to a CRM returns 404 Not Found for every contact. The URL is /v1/contact/123, but the docs say /v1/contacts/123,
plural. One letter fixes it. You add the correct endpoints to the API card and copy URLs from the docs rather than typing them.
🖱️Try it
Use a free public test API (search for "JSON placeholder API") with an HTTP Request node: make a GET for a list, a GET for one
item, and a POST that creates one. Note the status code each returns.
⚠️Common mistakes
- Treating every reply as success. Sign: a 422 error is saved as if it worked. Fix: check the status and branch on errors.
- Sending the body as text. Sign: "invalid JSON" errors. Fix: set the body type to JSON and
Content-Type: application/json.
🛠️For your project
Project 1 calls POST /accounts/invoices; try it by hand first and read the 201, 200 (repeat key) and 422 replies.
✅Quick check
What does a 422 reply usually mean?
Show the answer
The data you sent failed the API's validation; the reply usually says which field.
What's the difference between query parameters and the body?
Show the answer
Query parameters sit in the URL, usually to filter or page results; the body carries the data you're creating or updating.
