diff --git a/management/templates/users.html b/management/templates/users.html index b369fa89..793f0ff0 100644 --- a/management/templates/users.html +++ b/management/templates/users.html @@ -84,6 +84,47 @@ +
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
+