Create user
/api/crm/v2/team.add_userv2team.addUserCreates a user. The partner mode creates a user in the partner account with any role except owner. The affiliate mode creates a user in the affiliate account with any role except owner. The created record is returned in data.row.list[0].
Authorization
api-token + language + role
Request body multipart/form-data
Mode partner, multipart/form-data. Errors: 328 — invalid email format, 110 — password is shorter than 6 characters.
User roles, at least one; any role except owner
Example: user@fs.pro
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: 9999999999
Digits only; an empty value is saved as NULL
Example: 476962294
Example: Europe/Kaliningrad
Example: ru
Example: John Smith
Responses
OK
Values:successerror
Example: success
Mode partner, full user record (GET /team?id=)
Example: 1
Example: false
Example: 2024-05-02 08:31:16
Example: John Smith
Example: data:image/jpeg;base64,/9j/4AAQSkZJRg...
Example: operator@fs.pro
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: 9999999999
Example: 476962294
Example: false
Example: Europe/Kaliningrad
Example: ru
All user roles, sorted by role id
Example: 5
Role name from the roles directory; value set is open
Example: head_of_sales
The block toggle is available in this row to the current user; the rule is determined by the server, do not infer it from role names
Example: true
The current user can view and close sessions of this entry
Example: false