import { createClient } from "@mailsai/sdk";
const client = createClient(); // reads MAILS_API_KEY
const result = await client.health();
console.log(result);from mailsai import create_client
client = create_client() # reads MAILS_API_KEY
result = client.health()
print(result)curl 'https://api.mails.ai/api/health'mails health{ "name": "mails_health_check", "arguments": {} }{
"status": "healthy",
"version": "<version>",
"db": { "status": "ok", "error": "<error>" },
"ses": { "mocked": false, "region": "<region>" },
"classifier": { "mocked": false, "model": "<model>" },
"schemas": 0,
"timestamp": "2026-10-04T12:00:00.000Z"
}200 Service health.Health check
Liveness probe.
import { createClient } from "@mailsai/sdk";
const client = createClient(); // reads MAILS_API_KEY
const result = await client.health();
console.log(result);from mailsai import create_client
client = create_client() # reads MAILS_API_KEY
result = client.health()
print(result)curl 'https://api.mails.ai/api/health'mails health{ "name": "mails_health_check", "arguments": {} }{
"status": "healthy",
"version": "<version>",
"db": { "status": "ok", "error": "<error>" },
"ses": { "mocked": false, "region": "<region>" },
"classifier": { "mocked": false, "model": "<model>" },
"schemas": 0,
"timestamp": "2026-10-04T12:00:00.000Z"
}200 Service health.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
statusstring
healthy when the database answers and accepts writes, degraded otherwise. The HTTP status is 200 either way.
versionstring
The API's version string. Like db, ses, classifier and schemas, it is returned to internal callers only.
dbobject
The database check.
sesobject
The Amazon SES adapter, which matters only when SES is the mail provider in use.
classifierobject
The inbound classifier.
schemasinteger
How many definitions the database schema exports.
timestampstring
When the check ran (UTC).
Was this page helpful?