Replace trust

Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk.

PUT /v1/trust/{kind}/{id}

Addresshttps://api.hanzo.ai/v1/trust/{kind}/{id}
MethodPUT
Operationput_trust_by_kind_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Writes one record into a section of YOUR organization's trust centre — profile, control, document, subprocessor, policy, faq, update or risk.

A control written here is held to exactly the rule a control committed to the deployment's own inventory is held to, by the same validator: its prose may not claim a certificate and may not name a framework (a framework belongs in the mappings, where it arrives attached to a number), anything short of automated must say what is missing, and a mapping to a clause no framework declares is refused rather than scored as nothing.

A document defaults to GATED. An artifact an independent auditor signed — an attestation report, a certificate, a penetration test, an auditor letter — cannot be made public at all; it is released through a grant. A self-assessment can, because the organization is the one attesting it.

The deployment's OWN control inventory is governed in git and is not writable here: naming one of its ids is a conflict, not an overwrite.

Request

6 fields, body application/json (required).

FieldInTypeRequiredDescription
kindpathstringyesKind is the section being written.
idpathstringyesID is the record's id.
databodyany—Data is the record.
idbodystring—ID is the record's id.
kindbodystring—Kind is the section being written.
ordbodyinteger (int64)—Ord orders this record within its section, ascending, ties broken by id.

Response

StatusBodyMeaning
200trust.writtenok
defaultproblem-detailsrefused

200 body — 3 fields.

FieldInTypeAlwaysDescription
idbodystring—ID is the record's id — the one supplied, or the one minted when the caller supplied none.
kindbodystring—Kind is the section written.
updatedbodyinteger (int64)—Updated is when it was written, unix milliseconds.

Failure carries the platform error shape — see Errors.

Examples

hanzo trust kind set <kind> <id>
import { Configuration, TrustApi } from 'hanzoai';

const api = new TrustApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.putTrustByKindById({ kind: 'kind', id: 'id', data: "<data>", id: "<id>" });
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import TrustApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = TrustApi(client).put_trust_by_kind_by_id(kind='kind', id='id', data="<data>", id="<id>")
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

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

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

let result = trust_api::put_trust_by_kind_by_id(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.TrustApi;

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

var result = new TrustApi(client).putTrustByKindById();
curl -X PUT https://api.hanzo.ai/v1/trust/<kind>/<id> \
  -H "Authorization: Bearer $HANZO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
       "data": "<data>",
       "id": "<id>"
     }'

MCP reaches trust through the trust tool, which names its 17 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_trusts"
         }
       }
     }'

Trust API · All Hanzo APIs · Interactive reference

Was this page useful?