Returns the document's full audit trail, oldest first.
Returns the document's full audit trail, oldest first.
GET /v1/esign/documents/{id}/audit
| 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. It is the path segment: the URL is the addressing authority, and the org it is resolved in comes from the caller's principal, so… |
Response
| Status | Body | Meaning |
|---|---|---|
200 | esignTrail | ok |
200 body — 8 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
documentId | body | string | — | DocumentID is the document the trail belongs to. |
entries | body | esignEvent[] | — | Entries is every recorded event in order, oldest first. |
entries[].createdAt | body | integer | — | 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,… |
Failure carries the platform error shape — see Errors.
Examples
hanzo esign documents audit <id>import { Configuration, EsignApi } from 'hanzoai';
const api = new EsignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getEsignDocumentsByIdAudit({ id: 'id' });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')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.EsignAPI.GetEsignDocumentsByIdAudit(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.EsignApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new EsignApi(client).getEsignDocumentsByIdAudit();curl https://api.hanzo.ai/v1/esign/documents/<id>/audit \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches esign through the esign tool, which names its 9 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
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"
}
}
}'How is this guide?