> For the complete documentation index, see [llms.txt](https://form-1.gitbook.io/form-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://form-1.gitbook.io/form-docs/api-reference/health.md).

# Health Check

{% hint style="info" %}
Looking for the simplest way to use ILoveMusic? See the [CLI Guide](/form-docs/cli-guide.md) instead — the CLI talks to a fixed, known-live instance, so you never need to check this yourself. This page is for developers building their own integration.
{% endhint %}

```
GET {{BASE_URL}}/health
```

The only endpoint that does **not** require an `X-API-Key` header. It's intentionally unauthenticated so it can be used as a plain reachability/status check — most usefully here, as a way to confirm you have the instance's **current** base URL before relying on it (see [Getting Started](/form-docs/readme.md#base-url) for why that matters for this particular deployment).

```bash
curl {{BASE_URL}}/health
```

It checks the two stateful dependencies the API relies on — Postgres and Redis — independently, and reports both:

```
200 OK
```

```json
{
  "ok": true,
  "checks": {
    "database": "ok",
    "redis": "ok"
  }
}
```

If either dependency is unreachable, the endpoint reports `503` instead, with the specific check(s) marked `"error"`:

```
503 Service Unavailable
```

```json
{
  "ok": false,
  "checks": {
    "database": "ok",
    "redis": "error"
  }
}
```

No error details, stack traces, or connection strings are ever included in the response — only the `ok`/`error` status per dependency.

### Suggested use

* Before your first request, or after any period of not using the API: confirm `{{BASE_URL}}` still points at a live instance and both dependencies are healthy.
* If you're building an integration that retries on failure, treat a `503` here as "come back later," not as a bug in your request.


---

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://form-1.gitbook.io/form-docs/api-reference/health.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
