UserManager
Subaccount Management
Register service account to Subaccount
This function links service accounts to subaccounts and creates a subaccount if one does not exist.
Note:
You can only link email, FTP, or Web Disk accounts.
Important
You must use at least one of the following parameters:
- services.email.merge
- services.ftp.merge
- services.webdisk.merge
To link multiple service accounts, the service accounts must share the same username and domain.
get/UserManager/merge_service_account
Query parameters
domainstring domain required
Example:example.com
The service account's associated domain.
usernamestring username required
Example:example
The username for the service account that meets the account name limitations.
- Length - 64 characters
- Characters — a-z, A-Z, 0-9, dot (.), hyphen (-), underscore (_).
Note:
This value does not include the domain name.
services.email.merge0 | 1
Example:1
Whether to link the email account to the subaccount.
- 1 - Merge.
- 0 - Do not merge.
services.ftp.merge0 | 1
Example:1
Whether to link the FTP account to the subaccount.
- 1 - Merge.
- 0 - Do not merge.
services.webdisk.merge0 | 1
Example:1
Whether to link the Web Disk account to the subaccount.
- 1 - Merge.
- 0 - Do not merge.
Response
HTTP Request was successful.
Example response
{
"apiversion": 3,
"func": "merge_service_account",
"module": "UserManager",
"result": {
"data": {
"alternate_email": "user@example.com",
"avatar_url": "https://img.example.com/avatars/example.jpg",
"can_set_password": 1,
"dismissed": 1,
"dismissed_merge_candidates": [
{
"alternate_email": "user@example.com",
"avatar_url": "https://img.example.com/avatars/example.jpg",
"can_set_password": 1,
"domain": "example.com",
"full_username": "user@example.com",
"guid": "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4",
"issues": [
{
"area": "quota",
"limit": 1500,
"message": "Your account is over quota.",
"service": "email",
"type": "info",
"used": 2000
}
],
"parent_type": "hypothetical",
"phone_number": "+15551234567",
"real_name": "John Doe",
"services": {
"email": {
"enabled": 1,
"quota": 100
},
"ftp": {
"homedir": "/subaccount",
"quota": 100
},
"webdisk": {
"homedir": "/bob",
"perms": "rw"
}
},
"special": 1,
"type": "sub",
"username": "example"
}
],
"domain": "example.com",
"full_username": "user@example.com",
"guid": "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4",
"invite_expiration": 1591718154,
"issues": [
{
"area": "quota",
"limit": 1500,
"message": "Your account is over quota.",
"service": "email",
"type": "info",
"used": 2000
}
],
"merge_candidates": [
{
"alternate_email": "user@example.com",
"avatar_url": "https://img.example.com/avatars/example.jpg",
"can_set_password": 1,
"domain": "example.com",
"full_username": "user@example.com",
"guid": "N4641:EXAMPLE.COM:564CC8A7:A82EA007D8348AC631C0170F9418EC1DEB0D164CC5A722A87C55EF5DD2AD98D4",
"issues": [
{
"area": "quota",
"limit": 1500,
"message": "Your account is over quota.",
"service": "email",
"type": "info",
"used": 2000
}
],
"parent_type": "hypothetical",
"phone_number": "+15551234567",
"real_name": "John Doe",
"services": {
"email": {
"enabled": 1,
"quota": 100
},
"ftp": {
"homedir": "/subaccount",
"quota": 100
},
"webdisk": {
"homedir": "/bob",
"perms": "rw"
}
},
"special": 1,
"type": "sub",
"username": "example"
}
],
"parent_type": "hypothetical",
"phone_number": "+15551234567",
"real_name": "John Doe",
"services": {
"email": {
"enabled": 1,
"quota": 100
},
"ftp": {
"homedir": "/subaccount",
"quota": 100
},
"webdisk": {
"homedir": "/bob",
"perms": "rw"
}
},
"special": 1,
"type": "sub",
"username": "example"
},
"status": 1
}
}