Update the user's UI locale preference
Validates against the canonical `LOCALES` tuple. The session refresh + URL prefix swap happen client-side: on `204` the client calls `session.update({})` to force a JWT refresh, then `router.replace(pathname, { locale })` to swap the URL. All three steps are sequenced inside `useUpdateLocaleMutation.onSuccess`.
/api/user/localeValidates against the canonical LOCALES tuple. The session refresh + URL prefix swap happen client-side: on 204 the client calls session.update({}) to force a JWT refresh, then router.replace(pathname, { locale }) to swap the URL. All three steps are sequenced inside useUpdateLocaleMutation.onSuccess.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PATCH "https://loading/api/user/locale" \ -H "Content-Type: application/json" \ -d '{ "locale": "uk" }'Regenerate the DiceBear avatar seed POST
Rolls the avatar seed to a fresh UUID. The `image` URL changes; everything else stays. Returns the new URL so the client updates its avatar slot without a full profile refetch.
Unlink a linked OAuth account DELETE
Only unlinks the local `Account` row — does NOT revoke the provider-side consent (users manage that in Google / GitHub settings). Last-login-method guard runs in a `Serializable` transaction: counts remaining OAuth accounts + passkeys + email-OTP availability AFTER the hypothetical unlink. If zero would remain, returns `409` and the row is preserved — prevents single-click lockout.