Update user metadata not working

I am using the Management API to try to update an user metadata.
I am using this endpoint:

Update a User

PATCH/api/v2/users/{id

When I send my PATCH request I get the following answer from Auth0:

{"statusCode":400,"error":"Bad Request","message":"Payload validation error: '{message}'.","errorCode":"invalid_body"}

However, I am using a body according to the example of the API doc:

{
   "user_metadata": { "a" : "b" }
}

What’s wrong?

Hi @jose2 ,

Welcome to the Auth0 community!

Are you setting the Content-Type: application/json header to your update request?

Yes, I found out right after writing the question that that was the problem. Please close this ticket.