PUT
/users/{user_id}/metadataReplace a user's metadata
Replace a user's metadata attributes with the provided values.
Unlike PATCH /v1/users/{user_id}/metadata (merge semantics), this endpoint
replaces the supplied metadata fields entirely — the prior contents of each
supplied field are discarded. Fields omitted from the request body are
left unchanged.
Prefer the PATCH endpoint for partial updates. Use PUT only when you
explicitly intend to overwrite a metadata field wholesale.
user_idstringrequired
The ID of the user whose metadata will be replaced
public_metadataobjectoptional
Metadata saved on the user, that is visible to both your frontend and backend.
The existing value will be replaced entirely with the new object.
private_metadataobjectoptional
Metadata saved on the user that is only visible to your backend.
The existing value will be replaced entirely with the new object.
unsafe_metadataobjectoptional
Metadata saved on the user, that can be updated from both the Frontend and Backend APIs.
The existing value will be replaced entirely with the new object.
Note: Since this data can be modified from the frontend, it is not guaranteed to be safe.
200Success
idstringrequired
objectstringrequired
String representing the object's type. Objects of the same type share the same value.
external_idstringrequired
primary_email_address_idstringrequired
primary_phone_number_idstringrequired
primary_web3_wallet_idstringrequired
usernamestringrequired
first_namestringrequired
last_namestringrequired
localestringoptional
timezonestringoptional
profile_image_urlstringdeprecatedoptional
image_urlstringoptional
has_imagebooleanrequired
public_metadataobjectrequired
private_metadataobjectoptional
unsafe_metadataobjectoptional
email_addressesarray<object>required
phone_numbersarray<object>required
web3_walletsarray<object>required
passkeysarray<object>required
password_enabledbooleanrequired
two_factor_enabledbooleanrequired
totp_enabledbooleanrequired
backup_code_enabledbooleanrequired
mfa_enabled_atintegerrequired
Unix timestamp of when MFA was last enabled for this user. It should be noted that this field is not nullified if MFA is disabled.
mfa_disabled_atintegerrequired
Unix timestamp of when MFA was last disabled for this user. It should be noted that this field is not nullified if MFA is enabled again.
password_last_updated_atintegeroptional
Unix timestamp of when the user's password was last updated.
external_accountsarray<object>required
saml_accountsarray<object>required
enterprise_accountsarray<object>required
organization_membershipsarray<object>optional
last_sign_in_atintegerrequired
Unix timestamp of last sign-in.
bannedbooleanrequired
Flag to denote whether user is banned or not.
lockedbooleanrequired
Flag to denote whether user is currently locked, i.e. restricted from signing in or not.
deprovisionedbooleanoptional
Flag to denote whether user has been deprovisioned and is restricted from signing in.
lockout_expires_in_secondsintegerrequired
The number of seconds remaining until the lockout period expires for a locked user. A null value for a locked user indicates that lockout never expires.
verification_attempts_remainingintegerrequired
The number of verification attempts remaining until the user is locked. Null if account lockout is not enabled. Note: if a user is locked explicitly via the Backend API, they may still have verification attempts remaining.
updated_atintegerrequired
Unix timestamp of last update.
created_atintegerrequired
Unix timestamp of creation.
delete_self_enabledbooleanrequired
If enabled, user can delete themselves via FAPI.
create_organization_enabledbooleanrequired
If enabled, user can create organizations via FAPI.
create_organizations_limitintegeroptional
The maximum number of organizations the user can create. 0 means unlimited.
last_active_atintegerrequired
Unix timestamp of the latest session activity, with day precision.
legal_accepted_atintegerrequired
Unix timestamp of when the user accepted the legal requirements.
bypass_client_trustbooleanoptional
When set to `true`, the user will bypass Device Trust checks during sign-in.
directoriesarray<object>optional
All loaded directory links. Omitted when links were not loaded; an empty array means the user has no directory links.
directoryobjectdeprecatedoptional
The most recently updated directory link. Use directories for all links.
scimobjectdeprecatedoptional
Alias of directory. Use directories for all links.
400Request was not successful
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
401Authentication invalid
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
404Resource not found
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
422Invalid request parameters
errorsarray<object>required
metaobjectoptional
clerk_trace_idstringoptional
Error handling
A 400 is returned: Request was not successful. A 401 is returned: Authentication invalid. A 404 is returned: Resource not found. A 422 is returned: Invalid request parameters.