API

Update user

POST/api/crm/v2/team.update_userv2
operationId: team.updateUser

Updates 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

oneOf
One of the options
object (TeamUpdateUserPartner)

Mode partner, multipart/form-data

idintegerrequired

Example: 1

emailstring · emailrequired

The account owner's email cannot be changed

Example: email@example.com

passwordstring

An empty value keeps the current password; the account owner's password cannot be changed

Example: qwerty123

phone_format_idinteger (PhoneFormatId) required

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

phone_numberstringrequired

Example: 9939697322

telegram_user_idstringcan be null

Digits only; an empty value is saved as NULL

Example: 476962294

otp_enabledboolean

A value of false disables two-factor authentication

Example: false

timezonestringrequired

Example: Europe/Kaliningrad

languagestringrequired

Example: ru

namestringcan be null

Example: John Smith

firm_permission_role_idsarray of integer

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

photostring · binary

Responses

OK

object (Response)
statusstringrequired

Values:successerror

Example: success

One of the options
object

Error details

errorobjectrequired
codeintegerrequired

Error code

variablesobject
descriptionstringrequired

Error description