---
title: "Health check"
method: GET
path: "/api/health"
tags: ["Public"]
---

# Health check

`GET /api/health`

## Request

- Base URL: `https://api.mails.ai`
- URL: `https://api.mails.ai/api/health`
- Auth: none required

Liveness probe. Without authentication it returns `status` (`healthy` when the database answers and accepts writes, else `degraded`) and `timestamp`. The dependency detail (database, sender, classifier) is returned only to internal callers.

## Response `200`

Service health.

- Health
  - `status` 'healthy' | 'degraded', required: `healthy` when the database answers and accepts writes, `degraded` otherwise. The HTTP status is 200 either way.
  - `version` string: The API's version string. Like `db`, `ses`, `classifier` and `schemas`, it is returned to internal callers only.
  - `db` object: The database check.
    - `status` 'ok' | 'error', required: `ok`, or `error` when the database did not answer or is read-only.
    - `error` string: What went wrong, when `status` is `error`.
  - `ses` object: The Amazon SES adapter, which matters only when SES is the mail provider in use.
    - `mocked` boolean, required: True when the SES adapter is mocked or has no credentials, so it sends no real mail.
    - `region` string, required: The AWS region the SES adapter sends from.
  - `classifier` object: The inbound classifier.
    - `mocked` boolean, required: True when the classifier returns fixed test verdicts instead of calling its model.
    - `model` string, required: The model the classifier calls when it is not mocked.
  - `schemas` integer: How many definitions the database schema exports.
  - `timestamp` string, date-time, required: When the check ran (UTC).

---

[API](https://skmtc.dev/mails/apis/mails-ai-api.md) · [All operations](https://skmtc.dev/mails/apis/mails-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mails/apis/mails-ai-api/revisions/4d4930a8c33b?raw)
