# Run an app handler

> Dispatch one handler against the live app with test input and get its result. Bypasses the cache.

Source: https://docs.generalinput.com/api/workflows/app-run-handler



<Endpoint method="POST" path="/v1/workflows/:id/app/run-handler" />

<Access scope="workflows:manage" />

The same code path the iframe takes when a user clicks something. Runs against the **published** app.

## Body [#body]

| Field            | Type    | Required | Notes                                                             |
| ---------------- | ------- | -------- | ----------------------------------------------------------------- |
| `handlerName`    | string  | yes      | A `name` from `app.json` `handlers`.                              |
| `input`          | object  | no       | Handler input. Defaults to `{}`.                                  |
| `timeoutSeconds` | integer | no       | Server-side wait before returning a timeout. Default 60, max 300. |

## Response [#response]

```json
{ "ok": true, "result": { "customers": [], "nextCursor": null } }
```

A handler error is a `200` with the failure described, so a script can tell "the handler threw" from "the request was wrong":

```json
{
  "ok": false,
  "status": 500,
  "message": "Your Stripe connection expired. Reconnect Stripe and try again."
}
```
