Skip to main content
PATCH
Update a user

Authorizations

Authorization
string
header
required

API key or session token (Bearer)

Path Parameters

userId
string
required
Minimum string length: 1

Body

application/json
name
string
Required string length: 1 - 200
email
string<email>

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

Maximum string length: 254
role
string

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.

Required string length: 1 - 64

Response

The updated user

id
string
required
name
string
required
email
string
required
emailVerified
boolean
required
isAnonymous
boolean
required
image
string | null
required
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
role
string | null
required
banned
boolean
required
banReason
string | null
required
banExpires
string<date-time> | null
required
lastActiveAt
string<date-time> | null
required

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

signInMethods
string[]
required

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