# Service health

- Section: Service (TTF API reference)
- Source: https://ttf.bot/developers/docs/#health
- The whole reference as one text: https://ttf.bot/developers/docs/llms-full.txt

`GET /v1/health`

- Base URL: `https://api.ttf.bot`
- Cost: Free
- API key: not needed

Is the API up? Free, no key, never charged: use it for your own uptime checks.

## Exact rules

Liveness of the service and its limits store. No key, no charge; answers even while the API is off.

## Parameters

No parameters: just send it.

## Example request

```bash
curl -sS 'https://api.ttf.bot/v1/health'
```

## Example answer

`200` (`default`): Service health

```json
{
  "data": {
    "checked_at": "2026-11-28T10:00:00Z",
    "enabled": true,
    "redis": true
  },
  "meta": {
    "cost": 0,
    "request_id": "3f2a9c0e5b7d4e18a6c1f0b2d9e8a7c6"
  }
}
```

## Response fields

`always` = in every answer; `always*` = in every answer that does not narrow it with `fields`; any other field is left out when there is no value (never `null`). Objects are open: ignore keys you do not know.

A `200` answer is `{"data", "meta"}` (`HealthAnswer`).

### `data`

- `checked_at` (string (date-time), always): When this was checked. ISO-8601 UTC ("2026-11-28T10:00:00Z").
- `enabled` (boolean, always): true = the API is switched on (paid routes answer).
- `redis` (boolean, always): true = the limits store answers.

### `meta`

- `cost` (integer, always): Credits this call finally spent (= the X-Credits-Cost header). 0 for free routes and refused calls.
- `request_id` (string, always): Id of this request (= the X-Request-Id header). Quote it to support.
- `cached` (array of strings): The groups answered from the shared answer cache (charged at their cached weight). Absent when none.
- `partial` (array of strings): Something is missing. A bare group name ("holders"): that group failed, its entry in data is {"error": {...}} and only the attempt fee can apply. A dotted "\<group>.\<part>" ("security.holders"): a part of a group that DID answer is missing (see its complete / missing); that group is still billed. Absent when nothing is missing.

## Errors

| Status | Code | When |
| --- | --- | --- |
| 405 | `method_not_allowed` | Wrong HTTP method (every data route is GET). Not charged. Codes: method_not_allowed. |
| 500 | `internal` | Unexpected error. Not charged. Codes: internal. |
| other | `error` | Any other refusal of the HTTP layer (rare): the status says which. Codes: error. |

Every error is `{"error": {"code", "message", "doc_url", "request_id"}}`. What each code means and how to fix it: [Errors](https://ttf.bot/developers/docs/md/errors.md).
