Create hold

Places or releases a litigation hold on named records.

POST /v1/label/hold

Addresshttps://api.hanzo.ai/v1/label/hold
MethodPOST
OperationriskHoldLabels
AuthAuthorization: Bearer $HANZO_API_KEY

Places or releases a litigation hold on named records.

A hold is a fact about the RECORD, not about the world: it says retention may not dispose of this row, and it asserts nothing about what happened. So it is not a field on an assertion and it is not folded into the content digest — carried there it was silently a no-op on any record that already existed, since re-filing the same assertion with a hold flag produced the same digest, the insert was ignored, and the caller was answered duplicate while the hold it asked for was never placed. This op is the one way a hold moves, in either direction, and the move is written to the audit log.

Every named id is this tenant's or is nothing. The statement runs against the tenant's own file, which holds no other tenant's rows and has no column that could name one.

Request

2 fields, body application/json (required).

FieldInTypeRequiredDescription
holdbodyboolean—Hold is the state to put them in: true places the hold, false releases it.
idsbodystring[]—IDs are the content digests of the records, as returned by the write and by the read.

Response

StatusBodyMeaning
200label.riskHoldOutok
defaultproblem-detailsrefused

200 body — 4 fields.

FieldInTypeAlwaysDescription
changedbodyinteger (int64)—Changed is how many records moved into that state.
heldbodyinteger (int64)—Held is how many records this tenant is now holding, at any age.
holdbodyboolean—Hold echoes the state asked for.
missingbodyinteger (int64)—Missing is how many of the named ids this tenant does not hold.

Failure carries the platform error shape — see Errors.

Examples

hanzo label hold
import { Configuration, LabelApi } from 'hanzoai';

const api = new LabelApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.riskHoldLabels({ hold: false, ids: ["<ids>"] });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import LabelApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = LabelApi(client).risk_hold_labels(hold=False, ids=["<ids>"])
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

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

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

let result = label_api::risk_hold_labels(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.LabelApi;

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

var result = new LabelApi(client).riskHoldLabels();
curl -X POST https://api.hanzo.ai/v1/label/hold \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "hold": false,
       "ids": [
         "<ids>"
       ]
     }'

Tool label, op riskHoldLabels — POST the JSON-RPC envelope to https://api.hanzo.ai/v1/mcp.

curl -X POST https://api.hanzo.ai/v1/mcp \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "tools/call",
       "params": {
         "name": "label",
         "arguments": {
           "op": "riskHoldLabels",
           "input": {
             "hold": false,
             "ids": [
               "<ids>"
             ]
           }
         }
       }
     }'

Label API · All Hanzo APIs · Interactive reference

Was this page useful?