Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
README.md 948 B
Newer Older
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"}'
```