# HTTP request

Performs an HTTP request with a third-party app's REST API endpoint.

Available on the **PREMIUM** plan and above.

If you want to send data or fetch data from a third-party that WotNot does not have a native integration to, you can use the HTTP request action block.

HTTP request allows you to invoke a API endpoint and perform a **GET / POST / PUT** operation.

How to use Service Call - Overview

### Request <a href="#request" id="request"></a>

Configure the details for your API request.

#### Methods <a href="#methods" id="methods"></a>

Choose the method of your API endpoint you want to invoke. WotNot supports:

* GET
* POST
* PUT

#### **Endpoint URL** <a href="#endpoint-url" id="endpoint-url"></a>

You must provide the absolute URL, i.e., a URL starting with HTTP or HTTPS.

You can also use the variables in the URL by typing '#', as some APIs do not have headers and mention everything in the URL itself.

Copy

```
https://api.weatherapi.com/v1/current.json?key=e943b863ebed4572b55140350200312&q=#city#

Here in the above URL #city# is the variable that has been used
```

#### **Headers** <a href="#headers" id="headers"></a>

Add authentication data to the HTTP request. Commonly used for bearer token based authentication.

Make sure you add the **content-type** field to your request.

#### **Body** <a href="#body" id="body"></a>

Add the required information you want to send as part of your request.

You can send information in two ways:

**Raw:**

It is normal JSON format in which the request needs to be passed

![](https://help.wotnot.io/~gitbook/image?url=https%3A%2F%2F360969599-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FsrMxU8nO3RjusUiYuXBB%252Fuploads%252FwJiVZlWrx5Jo8cxZmlRd%252FCleanShot%25202024-06-20%2520at%252019.14.22.png%3Falt%3Dmedia%26token%3D24e2f856-bad1-43b8-ae58-8e0b2389c3b9\&width=768\&dpr=4\&quality=100\&sign=e4e6b64f\&sv=1)

**Form:**

It allows you to map the fields. You can either provide static value or map the variables

![](https://help.wotnot.io/~gitbook/image?url=https%3A%2F%2F360969599-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FsrMxU8nO3RjusUiYuXBB%252Fuploads%252F0LDmXOTMkpI0aogiR23M%252FCleanShot%25202024-06-20%2520at%252019.15.31.png%3Falt%3Dmedia%26token%3D6bcd41cd-df5b-4a8e-94ad-8134ba6f3eff\&width=768\&dpr=4\&quality=100\&sign=e60d9e35\&sv=1)

### **Response** <a href="#response" id="response"></a>

When the HTTP request is made, you will receive a response from the API.

You can store the objects received from the API into variables by mapping the fields.

Copy

```
// Object path for storing the response into variable where list is returned

result.data.list[0].id

// Here the value of the field `id` will be stored in the variable mapped to it.
```

Copy

```
// Object path for storing the response into variable where single value is returned

result.data.id 

// Here the value of the field 'id' will be stored in the variable mapped to it.
```

### Testing API request <a href="#testing-api-request" id="testing-api-request"></a>

Once you have configured your API request, you can click on the 'Test the API' button and see the response received.

From the response screen, you can directly save the object into a variable by clicking on the + icon.

![](https://help.wotnot.io/~gitbook/image?url=https%3A%2F%2F360969599-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FsrMxU8nO3RjusUiYuXBB%252Fuploads%252FjvbOwtMUD6hLrSydzTqc%252FCleanShot%25202024-06-20%2520at%252019.27.56.png%3Falt%3Dmedia%26token%3Dc6de53b6-d950-42ed-9f4e-b52b74905ada\&width=768\&dpr=4\&quality=100\&sign=b5d57124\&sv=1)\ <br>


---

# 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://help.wotsabot.ai/wotsabot-help-articles/integrations/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.
