> For the complete documentation index, see [llms.txt](https://docs.rootcause.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rootcause.ai/more-details/applications/application-modules/apicall.md).

# API Call

> Send data to an external API endpoint.

Calls an HTTP endpoint and emits the response.

Credentials come from `credentialSlotId` — a slot the application declares and an operator fills — so the flow never carries a secret. `timeoutS` is capped at 300; `executionMode` decides whether the endpoint is called once or once per row of the payload.

## At a glance

|                          |                        |
| ------------------------ | ---------------------- |
| Module type              | `APICall`              |
| Category                 | Outputs                |
| Default tier             | `durable`              |
| Runs on                  | `reactive`, `durable`  |
| Starts a flow            | no                     |
| Holds a body             | no                     |
| Keeps state between runs | no                     |
| Available in             | every application type |

## Parameters

### `method`

`"GET" | "POST" | "PUT" | "PATCH" | "DELETE"` · required · defaults to `"POST"`

The HTTP method.

### `url`

`string` · required · defaults to `""`

The endpoint; `{{...}}` interpolates from the payload.

### `headers`

`object[]` · required · defaults to `[]`

Headers sent with the request; each entry is a `key` and a `value`.

### `queryParams`

`object[]` · required · defaults to `[]`

Query string parameters; each entry is a `key` and a `value`.

### `body`

`string` · required · defaults to `""`

The request body; `{{...}}` interpolates from the payload.

### `executionMode`

`"once" | "perRow"` · required · defaults to `"once"`

Call once for the whole payload, or once per row of it.

### `credentialSlotId`

`string` · optional · defaults to `""`

The slot holding the endpoint's credentials, so no secret is stored in the flow.

### `timeoutS`

`number` · optional · defaults to `60`

Seconds to wait for a response, capped at 300.

## Inputs

| Port      | Kind    | Required | Description                                                                                                                           |
| --------- | ------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------- |
| `on`      | `event` | no       | Implicit on every module that does not itself start a flow: wire an event here to make this module the start of what that event runs. |
| `payload` | `json`  | no       | The request body, and the rows to iterate in `perRow` mode.                                                                           |

## Outputs

| Port       | Kind             | Connects to                        | Description                                                        |
| ---------- | ---------------- | ---------------------------------- | ------------------------------------------------------------------ |
| `response` | `json`           | `json`, `scalar`, `signal`         | The parsed response body.                                          |
| `status`   | `scalar<number>` | `scalar`, `json`, `text`, `signal` | The HTTP status code, so a flow can branch on it rather than fail. |

***

[← All application modules](/more-details/applications/application-modules.md)
