# HTTP Request Node

The **HTTP Request** node allows your Workflow to connect directly to external APIs and services via standard HTTP requests.\
It’s one of the most powerful nodes, because it enables Endless to interact with **any system that exposes an API**.

***

### 🛠️ How It Works

* You configure the node with the **endpoint URL**.
* Choose the **method** (GET, POST, PUT, DELETE, PATCH).
* Optionally add **headers** (e.g., authentication tokens, content type).
* Add **query parameters** or body parameters depending on the method.
* The Workflow sends the request and captures the **response** for use in later steps.

***

### ⚙️ Configuration Options

* **URL** → the API endpoint you want to call.
* **Method** → HTTP verb (GET, POST, PUT, DELETE, PATCH).
* **Headers** → e.g., `Authorization: Bearer <token>`, `Content-Type: application/json`.
* **Parameters** → query parameters (GET) or body fields (POST/PUT).
* **Timeout** → how long the Workflow should wait before failing.

You can also **test the request** inside the node to validate the configuration before deploying.

***

### 📌 Example Use Cases

* **Weather API**\
  Call `GET https://api.weather.com?city=São Paulo` and return the forecast to the Agent.
* **CRM Integration**\
  `POST https://crm.com/leads` with JSON body `{ "name": "Alice", "email": "alice@mail.com" }` to create a new lead.
* **Database Access**\
  Call a custom API endpoint to read or write information stored in your systems.

***

⚡ **Tip:** Combine the HTTP Request node with **Variables** to dynamically pass user input (like city, product ID, or email) into your API calls.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zaia.app/workflows/workflow-nodes/http-request-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
