> For the complete documentation index, see [llms.txt](https://docs.stackai.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.stackai.com/stackai-tools/communication-and-human-input/send-http-request.md).

# Send HTTP Request

Call an HTTP endpoint from a workflow. Use it when a service exposes an API operation that you need to call directly.

## Before you start

You need the endpoint’s request format and authorization requirements. Use the provider’s connection-backed action when that better fits the operation.

## Configure an API request

1. Enter the complete **URL** and choose the **HTTP Method** specified by the service’s API documentation.
2. Supply **Headers**, **Queries**, and **Request Body** as required. The request body is sent as JSON; it is not a general file-upload field.
3. Set **Request Timeout (seconds)** if the default 60-second wait is unsuitable. Supported values range from 1 to 300 seconds.
4. Run the request and inspect its response status and body. Enable **Response as File** when you need a downloadable response instead of inline content.

**Result:** The action returns the service’s response. With **Response as File** enabled, **Body File URL** contains the download link and **Body** is null.

## Behavior and troubleshooting

HTTP methods such as POST, PATCH, PUT, and DELETE can change data. An interrupted request may still have reached the service. Check the service’s result before retrying, and use its duplicate-prevention mechanism when available. A reachable endpoint still needs the authentication and permissions required by that service.

## Inputs

| Field                     | Parameter          | Description                                                                                                                                                                             |
| ------------------------- | ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| URL (required)            | `url`              | The URL endpoint to make the API request to                                                                                                                                             |
| HTTP Method (required)    | `method`           | The HTTP method to use for the request                                                                                                                                                  |
| Headers                   | `headers`          | HTTP headers to include in the request                                                                                                                                                  |
| Queries                   | `queries`          | HTTP queries to include in the request                                                                                                                                                  |
| Request Body              | `request_body`     | Data to send with the request, sent as JSON body                                                                                                                                        |
| Request Timeout (seconds) | `request_timeout`  |                                                                                                                                                                                         |
| Response as File          | `response_as_file` | Store the response body in a file and return its download URL instead of the raw text. Use it for endpoints whose response is too large to flow through the workflow. Default: `false`. |

## Related guidance

[Human Input and Approval Controls](https://docs.stackai.com/technical-reference/interfaces-and-conversations/human-input-and-approval-controls.md)


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.stackai.com/stackai-tools/communication-and-human-input/send-http-request.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
