Get documents

Returns one of the org's documents WITH its rendered body.

GET /v1/legal/documents/{id}

Addresshttps://api.hanzo.ai/v1/legal/documents/{id}
MethodGET
Operationget_legal_documents_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Returns one of the org's documents WITH its rendered body. 404 when the org has no document with that id — a document is never readable across orgs.

The response is marked no-store: the body is contract text, sealed at rest and returned only to the owning org, and must not sit in a shared cache.

Request

1 field.

FieldInTypeRequiredDescription
idpathstringyesID is the document's server-minted handle, "doc_"-prefixed.

Response

StatusBodyMeaning
200legal.documentReplyok
defaultproblem-detailsrefused

200 body — 14 fields.

FieldInTypeAlwaysDescription
disclaimerbodystring—Disclaimer is the boundary made visible on the wire.
documentbodylegal.documentView—
document.bodybodystring—Body is the rendered document.
document.categorybodystring—
document.contentTypebodystring—ContentType is the rendered body's media type — text/markdown.
document.createdAtbodyinteger (int64)—
document.esignProviderbodystring—
document.idbodystring—
document.signedAtbodyinteger (int64)—
document.statusbodystring—
document.templateIdbodystring—
document.templateVersionbodyinteger (int64)—
document.titlebodystring—
document.updatedAtbodyinteger (int64)—

Failure carries the platform error shape — see Errors.

Examples

hanzo legal documents get <id>
import { Configuration, LegalApi } from 'hanzoai';

const api = new LegalApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getLegalDocumentsById({ id: 'id' });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import LegalApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = LegalApi(client).get_legal_documents_by_id(id='id')
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.LegalAPI.GetLegalDocumentsById(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, legal_api};

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

let result = legal_api::get_legal_documents_by_id(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LegalApi;

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

var result = new LegalApi(client).getLegalDocumentsById();
curl https://api.hanzo.ai/v1/legal/documents/<id> \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches legal through the legal tool, which names its 10 operations with its own verbs — this one among them, under a name only MCP 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_legal_documents"
         }
       }
     }'

Legal API · All Hanzo APIs · Interactive reference

Was this page useful?