DELETE/v2/user/avatar

Delete the authenticated user's avatar

Deletes the avatar associated with the authenticated user's account. Use this operation when you want to remove the account image; the response contains the updated user profile.

5 status codes
200Returns the updated user profile, including account type, avatar details when present, account ID, username, and account status fields.
accountTypestringrequired
Allowed:LOCALMANAGEDTHIRD_PARTY
avatarobjectoptional
deletablebooleanrequired
domainstringoptional
emailAwaitingVerificationstringoptional
globalServerRolestringrequired
Allowed:USERADMINSUPPORTER
idintegerrequired
mfaEnabledbooleanrequired
namestringoptional
needsSuperJwtTokenbooleanrequired
thirdPartyAuthTypestringoptional
Allowed:GOOGLEGITHUBOAUTH2SSOSSO_GLOBAL
usernamestringrequired
400Returned when the avatar cannot be removed.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the request is unauthenticated.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user is not permitted to change the profile.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the user profile cannot be found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when the avatar cannot be removed. A 401 is returned when the request is unauthenticated, a 403 when the authenticated user is not permitted to change the profile, and a 404 when the user profile cannot be found. The operation applies to the authenticated user's account.