OpenapiLegal
Returns one template resolved for the caller's org — the org's own override if…
Returns one template resolved for the caller's org — the org's own override if it has saved one, else the built-in — with its full text/template body and…
GET /v1/legal/templates/{id}
| Address | https://api.hanzo.ai/v1/legal/templates/{id} |
| Method | GET |
| Operation | get_legal_templates_by_id |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns one template resolved for the caller's org — the org's own override if it has saved one, else the built-in — with its full text/template body and its declared merge fields. 404 when neither exists.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | ID is the template's stable id, e.g. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | templateReply | ok |
200 body — 12 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
disclaimer | body | string | — | Disclaimer is the boundary made visible on the wire. |
template | body | legalTemplate | — | |
template.body | body | string | — | |
template.category | body | string | — | |
template.counselReview | body | boolean | — | |
template.fields | body | Field[] | — | |
template.fields[].key | body | string | — | Key is the identifier the body substitutes ({{.key}}) and the key a generation's data map must carry. |
template.fields[].label | body | string | — | Label is the human prompt for whoever fills the value in — "Governing law (state)". |
template.id | body | string | — | |
template.origin | body | string | — | |
template.title | body | string | — | |
template.version | body | integer | — |
Failure carries the platform error shape — see Errors.
Examples
hanzo legal templates get <id>import { Configuration, LegalApi } from 'hanzoai';
const api = new LegalApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getLegalTemplatesById({ 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_templates_by_id(id='id')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.LegalAPI.GetLegalTemplatesById(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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_templates_by_id(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LegalApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new LegalApi(client).getLegalTemplatesById();curl https://api.hanzo.ai/v1/legal/templates/<id> \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches legal through the legal tool, which names its 11 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_legal_documents"
}
}
}'How is this guide?