> ## Documentation Index
> Fetch the complete documentation index at: https://stytch.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Update WebAuthn

> Update WebAuthn using the Stytch React SDK

Allows updating a WebAuthn registration's name.

## Parameters

<ParamField body="webauthn_registration_id" type="string" required>
  Globally unique UUID that identifies a Passkey or WebAuthn registration in the Stytch API. The webauthn\_registration\_id is used when you need to operate on a specific User's WebAuthn registration.
</ParamField>

<ParamField body="name" type="string" required>
  The name of the WebAuthn registration or Passkey.
</ParamField>

## Response

<ResponseField name="webauthn_registration" type="object">
  A Passkey or WebAuthn registration.

  <Expandable title="properties">
    <ResponseField name="webauthn_registration_id" type="string">
      The unique ID for the Passkey or WebAuthn registration.
    </ResponseField>

    <ResponseField name="domain" type="string">
      The domain on which Passkey or WebAuthn registration was started. This will be the domain of your app.
    </ResponseField>

    <ResponseField name="user_agent" type="string">
      The user agent of the User.
    </ResponseField>

    <ResponseField name="authenticator_type" type="string">
      The authenticator\_type string displays the requested authenticator type of the Passkey or WebAuthn device. The two valid types are "platform" and "cross-platform". If no value is present, the Passkey or WebAuthn device was created without an authenticator type preference.
    </ResponseField>

    <ResponseField name="verified" type="boolean">
      The verified boolean denotes whether or not this send method, e.g. phone number, email address, etc., has been successfully authenticated by the User.
    </ResponseField>

    <ResponseField name="name" type="string">
      The name of the Passkey or WebAuthn registration.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="request_id" type="string">
  Globally unique UUID that is returned with every API call. This value is important to log for debugging purposes; we
  may ask for this value to help identify a specific API call when helping you debug an issue.
</ResponseField>

<ResponseField name="status_code" type="number">
  The HTTP status code of the response. Stytch follows standard HTTP response status code patterns, e.g. 2XX values
  equate to success, 3XX values are redirects, 4XX are client errors, and 5XX are server errors.
</ResponseField>

<Panel>
  <RequestExample>
    ```jsx theme={null}
    import { StytchClient } from '@stytch/react';

    const stytch = new StytchClient('${publicToken}');

    stytch.webauthn.update({
      webauthn_registration_id: '${webauthnRegistrationId}',
      name: '${exampleWebAuthnName}',
    });
    ```
  </RequestExample>

  <ResponseExample>
    ```json 200 theme={null}
    {
      "status_code": 200,
      "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
      "user_id": "user-test-16d9ba61-97a1-4ba4-9720-b03761dc50c6",
      "webauthn_registration": {
        "webauthn_registration_id": "webauthn-registration-test-5c44cc6a-8af7-48d6-8da7-ea821342f5a6",
        "domain": "example.com",
        "user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
        "authenticator_type": "platform",
        "verified": true,
        "name": "Google Passkey"
      }
    }
    ```

    ```json 400 theme={null}
    {
      "status_code": 400,
      "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
      "error_type": "invalid_public_key_credential",
      "error_message": "Invalid public key credential. Please confirm you're passing a correctly formatted public key credential.",
      "error_url": "https://stytch.com/docs/api/errors/400"
    }
    ```

    ```json 404 theme={null}
    {
      "status_code": 404,
      "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
      "error_type": "webauthn_registration_not_found",
      "error_message": "WebAuthn registration could not be found.",
      "error_url": "https://stytch.com/docs/api/errors/404"
    }
    ```

    ```json 429 theme={null}
    {
      "status_code": 429,
      "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
      "error_type": "too_many_requests",
      "error_message": "Too many requests have been made.",
      "error_url": "https://stytch.com/docs/api/errors/429"
    }
    ```

    ```json 500 theme={null}
    {
      "status_code": 500,
      "request_id": "request-id-test-b05c992f-ebdc-489d-a754-c7e70ba13141",
      "error_type": "internal_server_error",
      "error_message": "Oops, something seems to have gone wrong, please reach out to support@stytch.com to let us know what went wrong.",
      "error_url": "https://stytch.com/docs/api/errors/500"
    }
    ```
  </ResponseExample>
</Panel>
