Replace certs

Changes a signing certificate's settings.

PUT /v1/iam/certs/{owner}/{name}

Addresshttps://api.hanzo.ai/v1/iam/certs/{owner}/{name}
MethodPUT
Operationput_iam_certs_by_owner_by_name
AuthAuthorization: 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).

FieldInTypeRequiredDescription
ownerpathstringyes
namepathstringyes
accessKeybodystring—
accessSecretbodystring—
accountbodystring—
bitSizebodyinteger (int64)—
certificatebodystring—
createdAtbodystring (date-time)—
createdTimebodystring—
cryptoAlgorithmbodystring—
deletedbodyboolean—
displayNamebodystring—
domainExpireTimebodystring—
expireInYearsbodyinteger (int64)—
expireTimebodystring—
idbodystring—
namebodystring—
ownerbodystring—
providerbodystring—
scopebodystring—
typebodystring—
updatedAtbodystring (date-time)—

Response

StatusBodyMeaning
200iam.Certok
202Approvalheld for approval
defaultproblem-detailsrefused

200 body — 20 fields.

FieldInTypeAlwaysDescription
accessKeybodystring—
accessSecretbodystring—
accountbodystring—
bitSizebodyinteger (int64)—
certificatebodystring—
createdAtbodystring (date-time)—
createdTimebodystring—
cryptoAlgorithmbodystring—
deletedbodyboolean—
displayNamebodystring—
domainExpireTimebodystring—
expireInYearsbodyinteger (int64)—
expireTimebodystring—
idbodystring—
namebodystring—
ownerbodystring—
providerbodystring—
scopebodystring—
typebodystring—
updatedAtbodystring (date-time)—

Failure carries the platform error shape — see Errors.

Examples

hanzo iam certs owner set <owner> <name>
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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.IamAPI.PutIamCertsByOwnerByName(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new IamApi(client).putIamCertsByOwnerByName();
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>"
     }'

MCP reaches iam through the iam tool, which names its 44 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_iam_applications"
         }
       }
     }'

IAM API · All Hanzo APIs · Interactive reference

Was this page useful?