AddGlobal
[POST] .../v1/user/addglobal
Creates a global user. Create or restore a global user account by phone number when user registration is managed outside the OAuth/Auth flow. The method validates phone and group_id, checks the current request user's user add permission, creates or restores the user and returns send_registration plus user_id. The request body is required, phone must be provided, group_id must be positive and the response currently returns send_registration as false because registration delivery is handled by Auth. Restoring a deleted user preserves the user ID and history. Previous personal roles and operational memberships are not restored; effective permissions are rebuilt from the explicitly selected group_id. The account database must be updated before restoration. An Auth subject already assigned to the account administrator cannot be added as a separate user and returns error 1165. After the administrator is changed to another person, the former administrator's deleted member record can be restored if all other checks pass. Missing body, missing phone, invalid group_id, denied permission, duplicate or restore conflicts and failures are returned as HTTP 200 ErrorResult.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| group_id | Int32 | Required | User group ID in the system. |
| phone | String | Required | User phone number. |
Request Example
{
"phone": "\u002B998901234567",
"group_id": 3
}
Response Parameters
| Name | Type | Description |
|---|---|---|
| ok | Boolean | Indicates whether the request completed successfully. |
| result | UserAddGlobalResposne | Result object. |
Response Example
{
"ok": true,
"result": {
"send_registration": false,
"user_id": 17
}
}