> For the complete documentation index, see [llms.txt](https://docs.hablla.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hablla.com/hablla-docs-en/automation-flows/all-components/triggers-and-http/http.md).

# HTTP

### Overview

The **HTTP Request Component** is an advanced action node designed to perform structured integrations with external systems (such as proprietary CRMs, ERPs, payment gateways, or logistics platforms). Its main function is to trigger synchronous calls to third-party endpoints and webhooks using the REST architecture. It allows you to send custom payloads and capture the responses (*response status and body*) to condition and branch the user journey within the chatbot in real time.

### Configuration Parameters

The component configuration offers full control over the HTTP protocol layers:

* **Method:** Dropdown used to select the HTTP verb for the request according to the desired operation in the target API. The options include:
  * `GET`: For reading or querying data.<br>
  * `POST`: For creating new records.<br>
  * `PUT` / `PATCH`: For updating existing data.<br>
  * `HEAD` / `OPTIONS` / `DELETE`: For structural operations or resource removal.<br>
* **Authentication:** Menu to load credentials previously saved on the platform (such as *Bearer Tokens*, *Basic Auth* or API keys).<br>
* **URL (\* Required Field):** The web address or target endpoint of the service (e.g.: `https://api.sistema.com/v1/leads`).<br>
* **Send query parameters (Toggle Key):** When activated, opens the section *Specify query parameters* with the option `Using fields` to build key-value pairs that will be appended to the URL as *Query Strings* (e.g.: `?status=active`).<br>
* **Send headers (Toggle Key):** When activated, opens the section *Specify Headers* and the repeater *Header Parameters* to inject custom properties into the request metadata (such as `Content-Type` or custom tokens).<br>
* **Send body (Toggle Key):** Unlocked mainly for write methods (`POST`, `PUT`, `PATCH`). Enables the field *Body content type* (such as `JSON` or `form-data`) for filling in the main payload.<br>
* **skipSslCertificateValidation (Toggle Key):** When enabled, instructs the automation engine to ignore invalid or expired SSL certificate errors on the target server.<br>
* **Request timeout:** Numeric field to determine the maximum wait window (*timeout*) in seconds before the system aborts the attempt.<br>

### Visual Builder

The builder interface was designed under an adaptive modular logic (*accordion design*):

* **Conditional Menu Expansion:** As shown in `image_452fc2.png`, the interface expands intelligently. When turning on the toggles (*toggles*), the panel releases the interactive buttons **+ Add parameter**, allowing key-value fields to be stacked in an organized way, hiding them when turned off to keep the screen clean.<br>
* **Destination Validation:** The asterisk (`*`) in the field *URL* serves as a syntactic lock in the editor. The automation flow cannot be published if the HTTP route is empty.<br>

### Special Operators

The logical properties of this component handle asynchronous requests and JSON payload inheritance:

* **String Interpolation in URL and Body:** All text fields in the component (URL, Parameters, Headers, and Body) natively support the use of double braces `{{...}}`. This allows dynamic calls to be built by injecting contact data collected in the flow (e.g.: `https://api.com/user/{{$data?.id_person}}`).<br>
* **Response Object Injection into Scope:** When the request completes successfully, the automation engine stores the response in the contact's local object (`$data`). The returned payload is made available to the next nodes through structured sub-variables:
  * `http.status`: Numeric return code (e.g.: `200` for success, `404` for not found).<br>
  * `http.body`: The content returned by the partner server (usually structured in JSON or XML).<br>

### Practical Examples

The table below demonstrates common scenarios for filling in the node properties to connect the flow with external APIs:

| **Selected Method** | **Configured URL**                         | **Activated Keys**                           | **Input Format**                                                                                                                                  | **Practical Use Case**                                                                                                           |
| ------------------- | ------------------------------------------ | -------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `GET`               | `https://api.exemplo.com/v1/cliente`       | Send query parameters                        | <p><strong>Key:</strong> <code>cpf</code><br><br><br><br><strong>Value:</strong> <code>{{$data?.cpf}}</code></p>                                  | Check a customer's credit status or registration in an internal database using the CPF collected in the chatbot.                 |
| `POST`              | `https://api.gateway.com/v2/pix`           | <p>Send headers<br><br><br><br>Send body</p> | <p><strong>Headers:</strong> <code>Authorization</code><br><br><br><br><strong>Body (JSON):</strong> <code>{"valor": {{$data?.total}}}</code></p> | Integrate the chatbot with a payment API to generate a dynamic PIX payment key and return the copy-and-paste code in the chat.   |
| `PATCH`             | `https://meucrm.com/api/leads/{{lead_id}}` | Send body                                    | **Body (JSON):** `{"status": "In service"}`                                                                                                       | Automatically update a lead's funnel stage within the company's corporate CRM as soon as the contact chooses to talk to a human. |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.hablla.com/hablla-docs-en/automation-flows/all-components/triggers-and-http/http.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
