Writes one record into a section of YOUR organization's trust centre — profile,…
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}
| Address | https://api.hanzo.ai/v1/trust/{kind}/{id} |
| Method | PUT |
| Operation | put_trust_by_kind_by_id |
| Auth | Authorization: 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 — a SOC 2 report, an ISO 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).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
kind | path | string | yes | Kind is the section being written. |
id | path | string | yes | ID is the record's id. |
data | body | any | — | Data is the record. What may be in it depends on the section, and every section's required fields are validated: a control is held to the same rule a committed… |
id | body | string | — | ID is the record's id. |
kind | body | string | — | Kind is the section being written. |
ord | body | integer | — | Ord orders this record within its section, ascending, ties broken by id. |
Response
| Status | Body | Meaning |
|---|---|---|
200 | written | ok |
200 body — 3 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
id | body | string | — | ID is the record's id — the one supplied, or the one minted when the caller supplied none. |
kind | body | string | — | Kind is the section written. |
updated | body | integer | — | Updated is when it was written, unix milliseconds. |
Failure carries the platform error shape — see Errors.
Examples
hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.
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 := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.TrustAPI.PutTrustByKindById(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new TrustApi(client).putTrustByKindById();The method above is the one at the current release of the document. [email protected] (npm) and [email protected] (PyPI) were generated from an earlier release, where this operation carried a different id, so it spells the method differently — regenerating the clients is what makes the two agree. SDKs →
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>"
}'The door declares no tool for trust — tools/list on https://api.hanzo.ai/v1/mcp names the products it does reach. Use HTTP or an SDK.
How is this guide?