# ath correct

> Replace a record's complete data and retain its prior revision.

Website: https://ath.fit/docs/correct/
Markdown: https://ath.fit/docs/correct.md

ATH v1.0.0 · MIT license. Documentation source: [7cd6a09](https://github.com/mwhitham/ath/blob/7cd6a097dbf2a12c7ea8a319869d4e0bb0def96b/src/program.ts). If your installed version differs, check its command help.

Checked 18 October 2026: v1.0.0 is available on npm.

## Usage

```text
ath correct <record-id> --revision 2 --data '<complete-data-json>' --json
```

## What it does

Keeps the stable record ID and complete earlier revisions. The expected revision prevents a stale preview from overwriting a newer change.

## Review before writing

Read the current record and revision, preview a complete replacement, then repeat with --yes. Attachments can be added while correcting an athlete report or nutrition entry.

```text
ath records show <record-id> --history --json
ath correct <record-id> --revision 2 --data '<complete-data-json>' --yes
```

## Options

| Argument or option | Description |
| --- | --- |
| `--revision <number>` | required current revision from the preview |
| `--data <json>` | complete replacement data object |
| `--agent <name>` | agent making the correction |
| `--attachment <path>` | supported attachment; repeat for several |
| `--file <path>` | change another database |
| `--dry-run` | preview without writing |
| `--json` | structured preview; never confirms the write |
