# List audit

URL: https://docs.hanzo.ai/docs/openapi/esign/get-esign-documents-by-id-audit

> Returns the document's full audit trail, oldest first.

`GET /v1/esign/documents/{id}/audit`

> [eSign →](https://docs.hanzo.ai/docs/openapi/esign) · [All API references →](https://docs.hanzo.ai/docs/openapi) · [Get started →](https://docs.hanzo.ai/docs/guides)

|               |                                                      |
| ------------- | ---------------------------------------------------- |
| **Address**   | `https://api.hanzo.ai/v1/esign/documents/{id}/audit` |
| **Method**    | `GET`                                                |
| **Operation** | `get_esign_documents_by_id_audit`                    |
| **Auth**      | `Authorization: Bearer $HANZO_API_KEY`               |

Returns the document's full audit trail, oldest first.

It answers every recorded event for the document in order — created, recipient
added, field created, sent, opened, each field inserted, each recipient
completed or rejected, and completion — with the actor and timestamp on each.
This is the evidence record behind a signature, so it is append-only and nothing
in the surface edits it.

The id is resolved in the caller's OWN tenant store, so another org's document
id is a 404.

## Request

1 field.

| Field | In   | Type   | Required | Description                   |
| ----- | ---- | ------ | -------- | ----------------------------- |
| `id`  | path | string | yes      | ID is the document to act on. |

## Response

| Status    | Body             | Meaning |
| --------- | ---------------- | ------- |
| `200`     | esign.esignTrail | ok      |
| `default` | problem-details  | refused |

`200` body — 8 fields.

| Field                 | In   | Type                | Always | Description                                                                                                                                                                                                                      |
| --------------------- | ---- | ------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `documentId`          | body | string              | —      | DocumentID is the document the trail belongs to.                                                                                                                                                                                 |
| `entries`             | body | esign.esignEvent\[] | —      | Entries is every recorded event in order, oldest first.                                                                                                                                                                          |
| `entries[].createdAt` | body | integer (int64)     | —      | CreatedAt is when it happened, in unix milliseconds.                                                                                                                                                                             |
| `entries[].data`      | body | any                 | —      | Data is the event's own detail, whose shape depends on the type — the field and recipient a signature was inserted for, the reason a document was rejected.                                                                      |
| `entries[].email`     | body | string              | —      | Email is the email of whoever caused it, null for an event with no actor — the sender's own calls are recorded without one.                                                                                                      |
| `entries[].id`        | body | string              | —      | ID is the entry id.                                                                                                                                                                                                              |
| `entries[].name`      | body | string              | —      | Name is the name of whoever caused it, null when it was not recorded.                                                                                                                                                            |
| `entries[].type`      | body | string              | —      | Type is what happened: DOCUMENT\_CREATED, RECIPIENT\_CREATED, FIELD\_CREATED, DOCUMENT\_SENT, DOCUMENT\_OPENED, DOCUMENT\_FIELD\_INSERTED, DOCUMENT\_RECIPIENT\_COMPLETED, DOCUMENT\_RECIPIENT\_REJECTED or DOCUMENT\_COMPLETED. |

Failure carries the platform error shape — see [Errors](https://docs.hanzo.ai/docs/errors).

## Examples

**CLI**

```bash
hanzo esign documents audit <id>
```

**SDK**

**.ts**

```ts
import { Configuration, EsignApi } from 'hanzoai';

const api = new EsignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getEsignDocumentsByIdAudit({ id: 'id' });
```

**.py**

```python
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import EsignApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = EsignApi(client).get_esign_documents_by_id_audit(id='id')
```

**.go**

```go
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.EsignAPI.GetEsignDocumentsByIdAudit(context.Background()).Execute()
if err != nil {
	return err
}
```

**.rs**

```rust
use hanzo_client::apis::{configuration::Configuration, esign_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = esign_api::get_esign_documents_by_id_audit(&cfg, Default::default()).await?;
```

**.java**

```java
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EsignApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new EsignApi(client).getEsignDocumentsByIdAudit();
```

**HTTP**

```bash
curl https://api.hanzo.ai/v1/esign/documents/<id>/audit \
  -H "Authorization: Bearer $HANZO_API_KEY"
```

**MCP**

MCP reaches **esign** through the `esign` tool, which names its 9 operations with its own verbs — this one among them, under a name only MCP declares. `describe` explains any of them:

```bash
curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "describe",
         "arguments": {
           "op": "list_esign_documents"
         }
       }
     }'
```

---

[eSign API](https://docs.hanzo.ai/docs/openapi/esign) · [All Hanzo APIs](https://docs.hanzo.ai/docs/openapi) · [Interactive reference](https://docs.hanzo.ai/docs/openapi/reference)
