Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Utility for creating a new user account in postfixadmin, and setting account
values via Nextcloud.
## Usage
Send a `PUT` request to `example.com:9000/create-account`. Required parameters:
```
target_email
password
password_confirm
displayname
email_quota
fallback_email
nextcloud_quota
```
You can use the following command to make a request:
```
curl -X PUT https://example.com:9000/create-account \
-d target_email=user@example.com -d password=pw -d password_confirm=pw \
-d displayname=name -d email_quota=quota -d fallback_email=user@otherdomain.com \
-d nextcloud_quota=-1
```
## Response values:
On success, status code will be 200 and response body:
```
'{"success": true}'
```
On failure, status code will be 4xx or 5xx and response body one of the following:
```
'{"success": false, "message": "username_forbidden"}'
'{"success": false, "message": "username_taken"}'
'{"success": false, "message": "internal_error"}'
```