administrators
/administrators [POST]
API Support | Available since | Last updated | Output |
---|---|---|---|
5.9500 | 5.9500 | json, xml |
Description
Add a member to the list of accounts with administrator privileges on the server.
If no member exists for the email address or username specified, an account is created.
When existing members are made administrators, their password is automatically reset. The system does not prevent a member from entering their previous password again, but it does not accept that password unless it is strong enough.
Parameters
Name | Description | Required | Type | Default |
---|---|---|---|---|
auto-activate | If a new member account should automatically activate (member-password should also be set) | no | boolean | false |
The email address of the member (required if member-username is not provided) | conditional | string | ||
firstname | The given name of the member (used to create a new account) | no | string | Member |
group | Group name or ID for email template to override the group on the request | no | string | |
member-password | The password of the member account (only to be set if no account exists) | no | string | [random] |
member-username | The username of the member. This defaults to the member email address (username is required if email is not provided) | conditional | string | |
notify-async | If email messages should be sent asynchronously (for slow or sensitive email servers) | no | boolean | false |
send-email | If the member should receive a “welcome and reset password” message | no | boolean | true |
surname | The family name of the member (used to create a new account) | no | string | [4 digits] |
Permission
This service requires administrator.
Response
<administrator-creation [member-created="true"]> <member id="[member id]" firstname="[first name]" surname="[surname]" username="[username]" status="[activated|unactivated|set-password]"> <fullname>[first and last name of the member]</fullname> </member> </administrator-creation>
Error Handling
0x1002 | If the email address is invalid |
---|---|
0x1005 | If the maximum number of members on the server has been reached |
0x100F | If send-email=true and member doesn't have an email address |
0x101A | The username and email are not from the same member |
0x1015 | Password is too weak |
0x1016 | Password cannot be equal to username |
0x1025 | The member is already an administrator |