> ## Documentation Index
> Fetch the complete documentation index at: https://docs.telepatia.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Audits

> Read a session's quality audit, list an institution's audits, and read the rubrics

An audit scores a completed scribe session's medical record against a rubric (an audit configuration). It returns a weighted total on a 0..1 scale, a qualitative grade, and a per-section breakdown.

<Note>
  Audit reads follow your API key's role. A session's audit is available to a doctor key (its own sessions) and to an institutional key. The audit **list** and the **configurations** require an institutional key.
</Note>

## A session's audit

`GET /v1/scribe-sessions/{id}/audit` returns the audit for one session. The `{id}` is either the `consultationInternalId` you set, or the session id (`ss_...`) the API returns. Returns `404` when the session has no audit — audit is disabled for it, or has not run yet.

```bash theme={null}
curl https://scribe-api.telepatia.ai/v1/scribe-sessions/CONSULT-12345/audit \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Response:**

```json theme={null}
{
  "id": "au_a1b2c3d4e5f6g7h8",
  "score": 0.82,
  "grade": "ACEPTABLE",
  "reviewStatus": "reviewed",
  "origin": "scribe",
  "createdAt": "2026-02-20T10:35:00Z",
  "configuration": {
    "id": "ac_9f8e7d6c5b4a3210",
    "name": "General medicine v2",
    "version": "1.2"
  },
  "sections": [
    { "name": "ANAMNESIS", "label": "Anamnesis", "score": 0.9 }
  ]
}
```

<Tip>
  `score` is the weighted total on a 0..1 scale. Map it to a grade band with the rubric's `scoreBands`, described in the audit configurations section below.
</Tip>

## Listing audits

`GET /v1/audits` lists your institution's audits, most recent first. It requires an institutional API key; a doctor key returns `403`. Paginate with `page` (1-based) and `limit` (1–50, default 20). Filter with `reviewStatus`, `createdFrom`, and `createdTo`.

```bash theme={null}
curl "https://scribe-api.telepatia.ai/v1/audits?page=1&limit=20&reviewStatus=reviewed" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Response:**

```json theme={null}
{
  "items": [
    {
      "id": "au_a1b2c3d4e5f6g7h8",
      "score": 0.82,
      "grade": "ACEPTABLE",
      "reviewStatus": "reviewed",
      "origin": "scribe",
      "createdAt": "2026-02-20T10:35:00Z",
      "patientName": "John Doe",
      "configuration": {
        "id": "ac_9f8e7d6c5b4a3210",
        "name": "General medicine v2",
        "version": "1.2"
      }
    }
  ],
  "total": null,
  "page": 1,
  "limit": 20,
  "totalPages": null,
  "hasMore": false
}
```

<Note>
  `total` and `totalPages` are always `null` — the list is not counted server-side. Use `hasMore` to paginate. Each item omits the per-section breakdown; fetch the full audit from the session endpoint above.
</Note>

## Audit configurations

`GET /v1/audits/configurations` returns the rubrics assigned to your institution — the ones used to audit it. It requires an institutional API key. Each rubric lists its weighted `sections` and its grade `scoreBands`, so you can turn a `score` into a label.

```bash theme={null}
curl https://scribe-api.telepatia.ai/v1/audits/configurations \
  -H "Authorization: Bearer YOUR_API_KEY"
```

**Response:**

```json theme={null}
{
  "items": [
    {
      "id": "ac_9f8e7d6c5b4a3210",
      "name": "General medicine v2",
      "version": "1.2",
      "active": true,
      "sections": [
        { "name": "ANAMNESIS", "displayName": "Anamnesis", "weight": 0.2 }
      ],
      "scoreBands": [
        { "threshold": 0.9, "label": "SOBRESALIENTE", "tone": "success" },
        { "threshold": 0.8, "label": "ACEPTABLE", "tone": "info" },
        { "threshold": 0.0, "label": "DEFICIENTE", "tone": "destructive" }
      ]
    }
  ]
}
```

<Note>
  A score earns the first band whose `threshold` is at or below it (bands are sorted by `threshold`, descending). `label` and `displayName` may be `null` when the rubric carries no default-locale text.
</Note>
