---
title: "Get Audit Trail"
method: GET
path: "/api/documents/{document_id}/audit"
---

# Get Audit Trail

`GET /api/documents/{document_id}/audit`

## Request

- Base URL: `https://zsign.io` (the document declares no server; this is the origin it was published from)
- URL: `https://zsign.io/api/documents/{document_id}/audit`
- Auth: HTTP bearer

Get comprehensive audit trail for a document -- completed or otherwise
terminal (voided, declined, expired, ...).

Completed documents have a persisted CompletedDocument + DocumentAuditTrail
pair (written by DocumentCompletionService at completion time) and are
served from that pair, unchanged. A document whose envelope was voided (or
otherwise ended without completing) never produces a CompletedDocument --
there is no signed PDF and no document hash for a completion certificate --
so that case falls back to looking the SigningSession up directly by
document_id and building its audit trail on the fly, uncached, with no
completion certificate.

Args:
    document_id: Completed document ID
    db: Database session

Returns:
    Audit trail with all events and completion certificate

## Path parameters

- `document_id` string, required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/zsign/apis/zsign-api.md) · [All operations](https://skmtc.dev/zsign/apis/zsign-api/llms.txt) · [OpenAPI document](https://skmtc.dev/zsign/apis/zsign-api/revisions/a674ac4137ba?raw)
