> 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/apiresponseout.md).

# API Response

> Sends the final response payload back to the API caller.

The exit point of an API application: whatever reaches it is what the caller gets back.

A flow with no APIResponseOut answers with the run's status and nothing else. `statusCode` and `responseHeaders` set the rest of the response.

## At a glance

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

## Parameters

### `statusCode`

`number` · optional · defaults to `200`

The status to answer with.

### `responseHeaders`

`object[]` · optional

Headers to set on the response; each entry is a `key` and a `value`.

## 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. |
| `response-body` | `json`  | yes      | The JSON to answer with.                                                                                                              |

## Outputs

*None.*

***

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