> ## Documentation Index
> Fetch the complete documentation index at: https://docs.testyourappnow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Health Checks

> Manage and run HTTP health checks against monitored routes.

Manage and run HTTP health checks. Dispatch the desired operation with the `action` field in the request body.

## Actions

| Action     | Description                                                  |
| ---------- | ------------------------------------------------------------ |
| `list`     | List all monitored health routes and their latest result.    |
| `add`      | Register a new URL to monitor.                               |
| `delete`   | Remove a monitored route.                                    |
| `run`      | Execute a health check immediately.                          |
| `schedule` | Schedule a health check to run once, on an interval, or now. |

## Request body

<ParamField body="action" type="string" required>
  One of `list`, `add`, `delete`, `run`, or `schedule`.
</ParamField>

<ParamField body="data" type="object">
  Payload for the selected action. Required for every action except `list`.

  <Expandable title="data fields">
    <ParamField body="url" type="string">
      Fully qualified URL to monitor. Required for `add`.
    </ParamField>

    <ParamField body="name" type="string">
      Human-readable name (1–80 characters). Required for `add`.
    </ParamField>

    <ParamField body="routeId" type="string">
      Identifier of the monitored route. Required for `delete`, `run`, and `schedule`.
    </ParamField>

    <ParamField body="when" type="string">
      Schedule mode: `at`, `every`, or `now`. Required for `schedule`.
    </ParamField>

    <ParamField body="time" type="string">
      Time expression paired with `when`. Required for `schedule`.
    </ParamField>
  </Expandable>
</ParamField>

## Response

The response shape varies by action.

<ResponseField name="success" type="boolean" required>
  Always `true` on success. Errors return `false` with an `error` string.
</ResponseField>

<ResponseField name="routes" type="array">
  Returned by `list`. Each route includes `id`, `url`, `name`, `createdAt`, and its `latest` HealthResult (or `null`).
</ResponseField>

<ResponseField name="route" type="object">
  Returned by `add`. The newly created route (`id`, `url`, `name`, `createdAt`).
</ResponseField>

<ResponseField name="result" type="object">
  Returned by `run`. A HealthResult with `status` (`up`, `slow`, `down`, `error`), `statusCode`, `responseMs`, and `checkedAt`.
</ResponseField>

<ResponseField name="scheduledId" type="string">
  Returned by `schedule`. Identifier of the scheduled job.
</ResponseField>

<Info>
  Every successful response includes the `X-Credits-Remaining` header with your remaining credit balance.
</Info>
