Update a user

Updates a user.

{info} Only an admin can update users.


Method Uri Auth Role
PUT /v1/users/{uuid} Bearer JWT-Token admin

Headers

The API requires a header Accept to be submitted with the request:

{
    "Accept": "application/json",
    "Authorization": "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3M..." 
}

Data constraints

{   
    "firstName": ["string"],
    "lastName": ["string"],
    "position": ["string"],
    "address": ["string"],
    "country": ["string"],
    "institute": ["string"],
    "postal": ["string"],
    "phone": ["string"]
}

Success Responses

Condition : User must be an admin.

Code : 200 Okay

{
    "firstName": "John",
    "lastName": "Doe",
    ...
}

Error Responses

Condition : If the current user does not have the role admin attached.

Code : 403 Forbidden

Content example :

{
  "message": "This user cannot update the requested user"
}