Login | Sign Up
  • FA
  • EN

API Docs

PUT /api/v1/users/{user-id}

Update the information of a specific user.


Permissions

PermissionDescription
users.update_anyUpdate any user as an admin

Request Body Parameters

NameTypeRequiredDescription
first_namestringNoFirst name (max 255)
last_namestringNoLast name (max 255)
emailstringNoEmail (max 255, unique)
phonestringNoPhone number (unique, E.164 format)
usernamestringNoUsername (max 255, unique)
heightintegerNoUser's height in CM
birth_datedateNoUser's birth date
passwordstringNoNew password (will be hashed)

All parameters are optional. If omitted, they will not be updated.


Response

200 OK

Returns the updated user resource.

{
  "data": { /* user resource */ }
}

See User Resource.


Error Responses

StatusDescriptionReference
404User not foundNot-found error
409Email or phone already in use
422Validation errorValidation error
401UnauthorizedAuthentication error
403ForbiddenPermission error
footer wave
logo

Dambel, the smart world of fitness and nutrition

LinkedinInstagramXYoutubeTelegramGitHub