Update user
/api/crm/v2/team.update_userv2team.updateUserUpdates a user; the set of fields depends on the mode.
Mode partner: email, password, and the account owner's OTP toggle cannot be changed; changing the role to or from owner is not allowed — use team.change_ownership for that.
Mode affiliate: an affiliate can only change their own email and password, otherwise error 100 is returned; account settings such as rate and balance cannot be edited here.
Authorization
api-token + language + role
Request body multipart/form-data
Mode partner, multipart/form-data
Example: 1
The account owner's email cannot be changed
Example: email@example.com
An empty value keeps the current password; the account owner's password cannot be changed
Example: qwerty123
Country code: 1-🇷🇺(+7|8), 2-🇦🇿(+994|0), 3-🇧🇾(+375|80), 4-🇰🇿(+7|8), 6-🇷🇸(+381|0), 7-🇹🇷(+90|0), 8-🇺🇦(+380|0), 9-🇵🇹(+351|0), 10-🇰🇬(+996|0), 11-🇺🇸(+1), 12-🇫🇷(+33|0), 13-🇲🇩(+373|0), 15-🇪🇪(+372), 18-🇬🇪(+995), 19-🇺🇿(+998), 22-🇵🇱(+48|0), 23-🇹🇯(+992|8), 25-🇷🇴(+40|0), 44-🇨🇭(+41|0)
Example: 1
Example: 9939697322
Digits only; an empty value is saved as NULL
Example: 476962294
A value of false disables two-factor authentication
Example: false
Example: Europe/Kaliningrad
Example: ru
Example: John Smith
Changing the role completely replaces previous roles; the owner role cannot be assigned, and owner roles cannot be changed — use team.change_ownership for this
Responses
OK
Values:successerror
Example: success
Error details
Error code
Error description