Admin

Change a user's name, email, or instance role. A new email must be verified again. You can't change your own role or remove the last administrator. Requires the users:update instance permission; API keys are rejected.

patch/admin/users/{userId}

Request

  • Base URL
    https://cloud.kaneo.app/api
  • URL
    https://cloud.kaneo.app/api/admin/users/{userId}
  • Auth
    HTTP bearer

Path parameters

userIdstring required

Request body

namestring
emailstring email

A new address must be verified again. It can't belong to another user.

rolestring

Instance role: admin administers the instance, user has no instance permissions, or the name of a custom role. Only administrators can assign admin, and nobody can assign a role with permissions they don't have.

Response

The updated user

idstring required
namestring required
emailstring required
emailVerifiedboolean required
isAnonymousboolean required
imagestring nullable required
createdAtstring date-time required
updatedAtstring date-time required
rolestring nullable required
bannedboolean required
banReasonstring nullable required
banExpiresstring date-time nullable required
lastActiveAtstring date-time nullable required

When one of the user's current sessions was last refreshed; null without a session.

signInMethodsstring[] required

Linked sign-in methods: credential (password), github, google, discord, or custom (OIDC).

Changes