Clear user nickname from the API

Hi,

I can see from the get user spec that the nickname field of a user is optional.
When updating a user (patch by id), is it possible to clear the user’s nickname?
Since this endpoint is a PATCH, giving nickname as null signals no change to the field, but giving nickname as "" gives a validation error: String is too short (0 chars), minimum 1' on property nickname (Preferred nickname or alias of this user).

I’m marking this thread with ‘bug’ due to documentation inconsistency.

Many thanks for any help in advance,
Jasper

Hi @jasper.law ,

To clear the nickname field, I tried below body script by updating a user and it works.

{
  "nickname": null
}

Could you try and see if it works? Thanks!

Yes, many thanks, this is now solved :slight_smile:

1 Like