# documents.history.get

Rebuild one saved version of an agreement template from its history (id from documents.history.list, and firstId to compare with the version before that session): its name, text, footer, letterhead, logo and signers, and the same for the version before.

`GET | POST /api/v1/accounting/documents.history.get`

Permissions: `accounting:read` · Roles: admin, finance

MCP tool: `accounting_documents_history_get`

## Fields

| Field | Type | Required | Notes |
| --- | --- | --- | --- |
| `documentType` | "agreement_template" | Yes |  |
| `documentId` | string (ID) | Yes | The ID of the related record. |
| `id` | string (ID) | Yes | The record's ID. |
| `firstId` | string (ID) |  | The ID of the related record. |

## Example request

```bash
curl -G https://app.getoatmilk.com/api/v1/accounting/documents.history.get \
  -H "Authorization: Bearer $OATMILK_API_KEY" \
  --data-urlencode 'documentType=agreement_template' \
  --data-urlencode 'documentId=1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d' \
  --data-urlencode 'id=9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d'
```

Reference page: https://app.getoatmilk.com/docs/api/documents.history.get
