Create webauthn credentials

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

Addresshttps://api.hanzo.ai/v1/iam/webauthn-credentials
MethodPOST
OperationaddWebauthnCredential
AuthAuthorization: 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).

FieldInTypeRequiredDescription
aaguidbodystring—
attachmentbodystring—
attestationFormatbodystring—AttestationFormat is the statement format the authenticator attested in ("packed", "apple", "none", …), which is a DIFFERENT value from the attestation type above.
attestationTypebodystring—
backupEligiblebodyboolean—
backupStatebodyboolean—
cloneWarningbodyboolean—
createdAtbodystring (date-time)—
createdTimebodystring—
credentialIdbodystring—
deletedbodyboolean—
idbodystring—
namebodystring—
ownerbodystring—
publicKeybodystring—
signCountbodyinteger (uint32)—
transportbodystring[]—
updatedAtbodystring (date-time)—
userbodystring—
userPresentbodyboolean—
userVerifiedbodyboolean—

Response

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

200 body — 22 fields.

FieldInTypeAlwaysDescription
webauthnCredentialbodyiam.WebauthnCredential—
webauthnCredential.aaguidbodystring—
webauthnCredential.attachmentbodystring—
webauthnCredential.attestationFormatbodystring—AttestationFormat is the statement format the authenticator attested in ("packed", "apple", "none", …), which is a DIFFERENT value from the attestation type above.
webauthnCredential.attestationTypebodystring—
webauthnCredential.backupEligiblebodyboolean—
webauthnCredential.backupStatebodyboolean—
webauthnCredential.cloneWarningbodyboolean—
webauthnCredential.createdAtbodystring (date-time)—
webauthnCredential.createdTimebodystring—
webauthnCredential.credentialIdbodystring—
webauthnCredential.deletedbodyboolean—
webauthnCredential.idbodystring—
webauthnCredential.namebodystring—
webauthnCredential.ownerbodystring—
webauthnCredential.publicKeybodystring—
webauthnCredential.signCountbodyinteger (uint32)—
webauthnCredential.transportbodystring[]—
webauthnCredential.updatedAtbodystring (date-time)—
webauthnCredential.userbodystring—
webauthnCredential.userPresentbodyboolean—
webauthnCredential.userVerifiedbodyboolean—

Failure carries the platform error shape — see Errors.

Examples

hanzo iam webauthn-credentials create
import { 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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.IamAPI.AddWebauthnCredential(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::add_webauthn_credential(&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).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>"
     }'

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?