Create a User
Adds a new user to your site. Only site administrators can create a new user.
Endpoint
POST https://mysite.files.com/api/v2/users
Replace mysite.files.com with your site address.
Request Body Schema
The request supplies the new user's identity, credentials, home path, and access settings. The permissions field is an object of permission flags, described after the main schema.
| Name | Data Type | Notes |
|---|---|---|
username | string | Required. Must follow standard username conventions. Spaces are not allowed. |
nickname | string | The full name of the new user. |
homeResource | string | Required. A path that the user will be given permission to. Site administrators must have a homeResource of /. The path provided here is used as the user_root for FTP. This can be specified as a file path (such as /path/to/folder) or as an ID string (such as id:1223). When providing an ID string, it must start with id:. |
email | string | Required. Must be a valid email address. |
password | string | Required. The password for the new user. Passwords cannot be set to common words or passwords known to have been disclosed. |
role | string | Required. Send admin to make the new user a site administrator, or user otherwise. Possible values: admin, user. |
permissions | object | An object containing name/value pairs for each permission. Any permission that is not passed will be set to false by default. If an empty object is provided, it will create a user with no permissions. When creating an admin user, set all of the permissions to true. |
timeZone | string | Required. Time zone, used for accurate time display within the application. Must be one of the allowed time zone identifiers. UTC is not a valid option. |
expiration | date-time | Optional timestamp when the user account expires. Format is YYYY-mm-dd HH:MM:SS. Must be in the future. You cannot retroactively expire a user account. |
locked | boolean | If true, the user account will be disabled. |
welcomeEmail | boolean | Legacy setting that is no longer used. |
onboarding | boolean | Legacy setting that is no longer used. |
Permissions Object
The permissions object included in the request schema has the following properties.
| Name | Data Type |
|---|---|
list | boolean |
download | boolean |
upload | boolean |
modify | boolean |
delete | boolean |
changePassword | boolean |
share | boolean |
notification | boolean |
viewFormData | boolean |
deleteFormData | boolean |
undelete | boolean |