Add an email address to this system. This will create a new login username/password.
| Email Address | Actions | Mailbox Size |
|---|
Use your box’s Mail user API to add/change/remove users.
Usage:
curl -X VERB [-d "value"] --user {email}:{password} https://{{hostname}}/admin/mail/users[action]
(Brackets denote an optional argument.)
(Adding ?format=json will give json encoded results)
| Verb | Action | |
|---|---|---|
| GET | Returns a list of existing mail users. | |
| POST | /add | Adds a new mail user. Required parameters are email and password. |
| POST | /remove | Removes a mail user. Required parameter is email. |
| POST | /privileges/add | Used to make a mail user an admin. Required parameters are email and privilege=admin. |
| POST | /privileges/remove | Used to remove the admin privilege from a mail user. Required parameter is email. |
Try these examples. For simplicity the examples omit the --user me@mydomain.com:yourpassword command line argument which you must fill in with your email address and password.
# Gives a json encoded list of all mail users
curl -X GET https://{{hostname}}/admin/mail/users?format=json
# adds a new email user
curl -X POST -d "email=new_user@mydomail.com" -d "password=s3curE_pa5Sw0rD" https://{{hostname}}/admin/mail/users/add
# removes a email user
curl -X POST -d "email=new_user@mydomail.com" https://{{hostname}}/admin/mail/users/remove
# adds admin privilege to an email user
curl -X POST -d "email=new_user@mydomail.com" -d "privilege=admin" https://{{hostname}}/admin/mail/users/privileges/add
# removes admin privilege from an email user
curl -X POST -d "email=new_user@mydomail.com" https://{{hostname}}/admin/mail/users/privileges/remove