Skip to main content
PATCH
Update a user by ID

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your API key. Must only be used when using Hanko Cloud.

Path Parameters

id
string<uuid4>
required

ID of the user

Example:

"c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c"

Body

application/json

Patch payload for updating a user.

Omitted properties are not changed.

username
string | null

Set a new username for the user.

Send null to remove the username.

Example:

"john_doe_123"

name
string | null

Set a new username for the user.

Send null to remove the name.

Example:

"John Doe"

given_name
string | null

Set a new given name for the user.

Send null to remove the given_name.

Example:

"John"

family_name
string | null

Set a new family name for the user.

Send null to remove the family_name.

Example:

"Doe"

picture
string<uri> | null

Set a new picture for the user. Must be a public URL accessible via HTTP/HTTPS. Must not contain credentials.

Send null to remove the picture.

Maximum string length: 2048

Response

Details about the user

id
string<uuid4>
required

The ID of the user

Example:

"c339547d-e17d-4ba7-8a1d-b3d5a4d17c1c"

created_at
string<date-time>
required

Time of creation of the user

updated_at
string<date-time>
required

Time of last update of the user

webauthn_credentials
object[]

List of registered Webauthn credentials

emails
object[]

List of emails associated to the user

username
object

The username of the user

otp
object
password
object

The password credential of a user

identities
object[]

A list of third party provider identities

metadata
object

User metadata