OpenapiIam
Registers a passkey or security key for a person, so they can sign in with…
Registers a passkey or security key for a person, so they can sign in with their device instead of a password.
POST /v1/iam/webauthn-credentials
| Address | https://api.hanzo.ai/v1/iam/webauthn-credentials |
| Method | POST |
| Operation | addWebauthnCredential |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Registers a passkey or security key for a person, so they can sign in with their device instead of a password.
Request
21 fields, body application/json (required).
| Field | In | Type | Required | Description |
|---|---|---|---|---|
aaguid | body | string | — | |
attachment | body | string | — | |
attestationFormat | body | string | — | AttestationFormat is the statement format the authenticator attested in ("packed", "apple", "none", …), which is a DIFFERENT value from the attestation type… |
attestationType | body | string | — | |
backupEligible | body | boolean | — | |
backupState | body | boolean | — | |
cloneWarning | body | boolean | — | |
createdAt | body | string (date-time) | — | |
createdTime | body | string | — | |
credentialId | body | string | — | |
deleted | body | boolean | — | |
id | body | string | — | |
name | body | string | — | |
owner | body | string | — | |
publicKey | body | string | — | |
signCount | body | integer | — | |
transport | body | string[] | — | |
updatedAt | body | string (date-time) | — | |
user | body | string | — | |
userPresent | body | boolean | — | |
userVerified | body | boolean | — |
Response
| Status | Body | Meaning |
|---|---|---|
200 | iam.webauthnCredentialResult | ok |
200 body — 22 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
webauthnCredential | body | iam.WebauthnCredential | — | |
webauthnCredential.aaguid | body | string | — | |
webauthnCredential.attachment | body | string | — | |
webauthnCredential.attestationFormat | body | string | — | AttestationFormat is the statement format the authenticator attested in ("packed", "apple", "none", …), which is a DIFFERENT value from the attestation type… |
webauthnCredential.attestationType | body | string | — | |
webauthnCredential.backupEligible | body | boolean | — | |
webauthnCredential.backupState | body | boolean | — | |
webauthnCredential.cloneWarning | body | boolean | — | |
webauthnCredential.createdAt | body | string (date-time) | — | |
webauthnCredential.createdTime | body | string | — | |
webauthnCredential.credentialId | body | string | — | |
webauthnCredential.deleted | body | boolean | — | |
webauthnCredential.id | body | string | — | |
webauthnCredential.name | body | string | — | |
webauthnCredential.owner | body | string | — | |
webauthnCredential.publicKey | body | string | — | |
webauthnCredential.signCount | body | integer | — | |
webauthnCredential.transport | body | string[] | — | |
webauthnCredential.updatedAt | body | string (date-time) | — | |
webauthnCredential.user | body | string | — | |
webauthnCredential.userPresent | body | boolean | — | |
webauthnCredential.userVerified | body | boolean | — |
Failure carries the platform error shape — see Errors.
Examples
hanzo iam webauthn-credentials createimport { Configuration, IamApi } from 'hanzoai';
const api = new IamApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.addWebauthnCredential({ aaguid: "<aaguid>", attachment: "<attachment>" });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).add_webauthn_credential(aaguid="<aaguid>", attachment="<attachment>")cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.IamAPI.AddWebauthnCredential(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::add_webauthn_credential(&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).addWebauthnCredential();curl -X POST https://api.hanzo.ai/v1/iam/webauthn-credentials \
-H "Authorization: Bearer $HANZO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"aaguid": "<aaguid>",
"attachment": "<attachment>"
}'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?