Changes a signing certificate's settings.
Changes a signing certificate's settings. What it is called does not change, and neither does when it was added.
PUT /v1/iam/certs/{owner}/{name}
| Address | https://api.hanzo.ai/v1/iam/certs/{owner}/{name} |
| Method | PUT |
| Operation | put_iam_certs_by_owner_by_name |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Changes a signing certificate's settings. What it is called does not change, and neither does when it was added.
A PUT here is a METADATA edit — display name, expiry, provider. It overlays
only the fields the request actually SET onto the loaded row: a field the JSON
omits (or leaves at its zero value) keeps what the row holds, rather than
blanking it. That is load-bearing, not a nicety. A read serves the public
Certificate (Mask hides only PrivateKey and AccessSecret), so a client that
reads a cert, changes one field, and writes it back sends the masked halves
empty and every other field it did not touch at its zero value — and the old
full-struct overlay wrote all of those blanks back. Blanking CryptoAlgorithm
alone drops the cert from the JWKS (oidc.Publishes turns false), so every
token under its kid stops verifying; blanking Provider/Account/ExpireTime
breaks ACME renewal and expiry — all from a request that only meant to rename
it. Absent-or-zero means "unchanged", so the deployment (key) and a rotation
(cert) remain the only way key or published material changes; the metadata API
cannot clear it.
The overlay is generic — it copies every set field, so a field nobody has added yet is carried without a line here — and leaves three things the request may not move: the bound Model (id, createdAt, key, snapshot), the natural key (owner/name address the row, they do not mutate it), and the creation stamp.
Request
22 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
owner | path | string | yes | |
name | path | string | yes | |
accessKey | body | string | — | |
accessSecret | body | string | — | |
account | body | string | — | |
bitSize | body | integer | — | |
certificate | body | string | — | |
createdAt | body | string (date-time) | — | |
createdTime | body | string | — | |
cryptoAlgorithm | body | string | — | |
deleted | body | boolean | — | |
displayName | body | string | — | |
domainExpireTime | body | string | — | |
expireInYears | body | integer | — | |
expireTime | body | string | — | |
id | body | string | — | |
name | body | string | — | |
owner | body | string | — | |
provider | body | string | — | |
scope | body | string | — | |
type | body | string | — | |
updatedAt | body | string (date-time) | — |
Response
| Status | Body | Meaning |
|---|---|---|
200 | iam.Cert | ok |
200 body — 20 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
accessKey | body | string | — | |
accessSecret | body | string | — | |
account | body | string | — | |
bitSize | body | integer | — | |
certificate | body | string | — | |
createdAt | body | string (date-time) | — | |
createdTime | body | string | — | |
cryptoAlgorithm | body | string | — | |
deleted | body | boolean | — | |
displayName | body | string | — | |
domainExpireTime | body | string | — | |
expireInYears | body | integer | — | |
expireTime | body | string | — | |
id | body | string | — | |
name | body | string | — | |
owner | body | string | — | |
provider | body | string | — | |
scope | body | string | — | |
type | body | string | — | |
updatedAt | body | string (date-time) | — |
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, IamApi } from 'hanzoai';
const api = new IamApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.putIamCertsByOwnerByName({ owner: 'owner', name: 'name', accessKey: "<accessKey>", accessSecret: "<accessSecret>" });from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import IamApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = IamApi(client).put_iam_certs_by_owner_by_name(owner='owner', name='name', access_key="<accessKey>", access_secret="<accessSecret>")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.IamAPI.PutIamCertsByOwnerByName(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, iam_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = iam_api::put_iam_certs_by_owner_by_name(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.IamApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new IamApi(client).putIamCertsByOwnerByName();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/iam/certs/<owner>/<name> \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"accessKey": "<accessKey>",
"accessSecret": "<accessSecret>"
}'The door reaches iam through the iam tool, which names its 75 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__well_known_jwks"
}
}
}'How is this guide?