# Empathy in Medicine Initiative: Public API

Read-only endpoints. No authentication, no API key, no personal data.
Base URL: `https://empathyinmedicine.org`

Machine-readable description: [`/openapi.json`](https://empathyinmedicine.org/openapi.json)
API catalog: [`/.well-known/api-catalog`](https://empathyinmedicine.org/.well-known/api-catalog)

## GET /api/health

Liveness probe.

```json
{ "status": "ok", "timestamp": "2026-08-17T01:38:25.938Z", "mode": "production" }
```

## GET /api/stats/impact

Aggregate programme totals derived from ambassador monthly reports.

Duplicate submissions are collapsed and implausible outliers excluded at read
time. Both counts are returned (`duplicatesCollapsed`, `outliersExcluded`) so the
published totals can be audited rather than taken on trust.

```json
{ "totalReports": 100, "duplicatesCollapsed": 15, "outliersExcluded": 1,
  "totalCliniciansTrained": 478, "uniqueOrganizations": 55, "schools": [ ... ] }
```

## GET /api/stats/ambassadors

Public ambassador roster: name, organisation, country, certification status.
Contact details are never returned.

```json
{ "ambassadors": [ { "id": 1106, "name": "...", "organization": "...", "trained": true } ] }
```

## Everything else

All other `/api/*` routes require an authenticated session and are intentionally
undocumented. They are disallowed in `robots.txt` and are not part of any
public contract.

## Content negotiation

Every page on this site answers `Accept: text/markdown` with a markdown
representation, which is usually a cheaper read than the HTML.

```
curl -H 'Accept: text/markdown' https://empathyinmedicine.org/Articles/teach-back-method-evidence
```

## Reuse

Content is free to cite with attribution (CC BY 4.0). Per our
`robots.txt` Content-Signal: `search=yes, ai-input=yes, ai-train=no`.
