# HTTP Request

The HTTP Request block allows you to make request to any external Rest API. The primary use case for this in chat is to fetch data from a customized external system and also to send collected information out to an external system such as an order update.&#x20;

### How to make a API Request?

1. Start by selecting extensions in the flow palette on the left in the flow builder

2. Drag an Add On node on to the flow builder\ <br>

   <figure><img src="/files/gaaPro3MYnOamnDmhYia" alt=""><figcaption></figcaption></figure>

3. In the properties add the details of the API you are calling.&#x20;
   1. You can choose the url or specify a parameter that holds the url&#x20;
   2. Specify headers, payloads and HTTP method

4. Save the properties and then connect your node in your flow

### How to use the API Response?

When your HTTP Request gets a response back it is available in a parameter called **actionOutput**. This parameter will contain the response sent by the external system.

To use this you can make use of templating language to access any fields inside the response. For example if this is the response and we wanted to show order details:

API Response

```
{"order": {"id": 12, "name": "blue tshirt", "price": 10, "count" 1}}
```

Template

```
Order Id: {{ actionOutput.order.id }}
Product: {{ actionOutput.order.name }} ${{ actionOutput.order.price }} 
Quantity: {{ actionOutput.order.count }}
```

The templates can be used in any messages being sent to customers.

<figure><img src="/files/DIONeamHHEhBvCq1ww4m" alt=""><figcaption></figcaption></figure>


---

# 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.deepconverse.com/product-docs/conversational-flow-builder/conversation-blocks/http-request.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.
