"description":"Create a new user.\n\nThis operation can be called without authentication in any of this cases:\n* There is not any administrator yet on the server,\n* The subscriptions are not disabled in the server's policies.\n\nIf the first administrator is created by this call, subscriptions are automatically disabled.",
"requestBody":{
"x-name":"request",
"content":{
"application/json":{
"schema":{
"type":"object",
"additionalProperties":false,
"properties":{
"email":{
"type":"string",
"description":"The email of the new user",
"nullable":false
},
"password":{
"type":"string",
"description":"The password of the new user"
},
"isAdministrator":{
"type":"boolean",
"description":"Make this user administrator (only if you have the `unrestricted` permission of a server administrator)",
"nullable":true,
"default":false
}
}
}
}
},
"required":true,
"x-position":1
},
"responses":{
"201":{
"description":"Information about the new user",
"content":{
"application/json":{
"schema":{
"$ref":"#/components/schemas/ApplicationUserData"
}
}
}
},
"400":{
"description":"A list of errors that occurred when creating the user",
"description":"If you need to authenticate for this endpoint (ie. the server settings policies lock subscriptions and that an admin already exists)"
},
"403":{
"description":"If you are authenticated but forbidden to create a new user (ie. you don't have the `unrestricted` permission on a server administrator or if you are not administrator and registrations are disabled in the server's policies)"
},
"429":{
"description":"DDoS protection if you are creating more than 2 accounts every minutes (non-admin only)"
"description":"Delete a user.\n\nMust be an admin to perform this operation.\n\nAttempting to delete the only admin user will not succeed.\n\nAll data associated with the user will be deleted as well if the operation succeeds.",
"parameters":[
{
"name":"userId",
"in":"path",
"required":true,
"description":"The ID of the user to be deleted",
"schema":{
"type":"string"
}
}
],
"responses":{
"200":{
"description":"User has been successfully deleted"
},
"401":{
"description":"Missing authorization for deleting the user"
},
"403":{
"description":"Authorized but forbidden to delete the user. Can happen if you attempt to delete the only admin user."
},
"404":{
"description":"User with provided ID was not found"