# Create a new account with initial user Creates a new account with an initial user profile. The account will have a unique email and the user will have a unique username. This endpoint validates that the username is not reserved, the username doesn't already exist, and the email is not already registered. Returns the created account with its associated user information. RBAC: requires Users.Manage Endpoint: POST /api/v1/admin/create-account Version: 1.0 Security: ## Query parameters: - `htmlContent` (any) Returns text as html if true or original text if false. Applicable only to local posts and users. Default is true. ## Request fields (application/json): - `username` (string, required) Username of the main user Example: "john_smith" - `displayName` (string, required) Display Name of the main user Example: "John Smith" - `email` (string, required) Accounts' email Example: "email@gmail.com" - `password` (string, required) Account password, enforced by password policy Example: "PassW0rd!" - `inviteCode` (string,null) Optional invite code Example: "abcd-efgh-1234" ## Response 200 fields (application/json): - `account` (object, required) Account details including email, login type, and creation date - `account.id` (string, required) Internal account id Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `account.email` (string,null) Account email Example: "john@example.com" - `account.password` (string,null) - `account.phone` (string,null) Account phone Example: "+12345678901" - `account.createdAt` (string, required) Example: "2022-03-10T16:15:50Z" - `account.updatedAt` (string, required) Example: "2022-03-10T16:15:50Z" - `users` (array, required) Non-empty list of users associated with this account. Most accounts have one user, but multiple users are supported. - `users.groupUserName` (string,null) Name of the channel inside a group - `users.id` (string, required) internal id of this user Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `users.username` (string, required) unique user name Example: "john_smith" - `users.domain` (string, required) user's domain, remote only, empty for local Example: "wlsly1.net" - `users.displayName` (string, required) full name of the user Example: "John Smith" - `users.summary` (string, required) User's summary or bio Example: "Pixels are my paint, code is my canvas, creativity is my brush." - `users.uri` (string, required) URI of this user Example: "https://wlsly1.net/users/john_smith" - `users.stats` (object, required) User stats - `users.stats.posts` (integer, required) number of posts - `users.stats.followers` (integer, required) number of followers - `users.stats.following` (integer, required) number of following - `users.stats.followingHidden` (boolean, required) privacy setting to hide followings - `users.stats.totalStorageBytes` (integer, required) total storage volume in bytes - `users.stats.comments` (integer, required) number of comments - `users.fields` (object, required) User fields - `users.avatar` (object,null) User's avatar - `users.avatar.uploadId` (string, required) Internal id Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `users.avatar.userId` (string, required) User id this upload belongs to Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `users.avatar.uploadType` (string, required) Type of the upload Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER" - `users.avatar.meta` (object, required) Meta data - `users.avatar.meta.blurhash` (string,null) - `users.avatar.meta.name` (string,null) - `users.avatar.meta.altText` (string,null) - `users.avatar.size` (integer, required) Size in bytes of all the files in this upload - `users.avatar.files` (array, required) List of all the files this upload has - `users.avatar.files.uri` (string,null, required) Full url of the file - `users.avatar.files.fileId` (string, required) File id Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `users.avatar.files.extension` (string, required) File extension Example: "mp4" - `users.avatar.files.original` (boolean, required) true if this file is original, false if it is a derivative - `users.avatar.files.meta` (object, required) File metadata. Contains optional values for width, height etc. - `users.avatar.files.meta.duration` (number,null) Video duration in seconds - `users.avatar.files.meta.width` (integer,null) Media width - `users.avatar.files.meta.height` (integer,null) Media height - `users.avatar.files.meta.codec` (string,null) Video codec - `users.avatar.files.meta.rotate` (integer,null) Rotation in degrees - `users.avatar.files.size` (integer, required) File size in bytes - `users.avatar.files.type` (string, required) File type Enum: "VIDEO", "IMAGE", "AUDIO", "DOCUMENT", "OTHER" - `users.avatar.tags` (array, required) List of tags attached to upload Enum: "Post", "Avatar", "Header", "Album", "Emoji", "Event" - `users.avatar.error` (string,null) Upload processing error - `users.avatar.cached` (boolean) true if cached - `users.avatar.logs` (string,null) Logs - `users.avatar.remote` (boolean) true if this upload is remote - `users.header` (object,null) User's header - `users.deleted` (boolean,null) - `users.state` (string, required) User's moderation state Enum: "REGULAR", "SENSITIVE", "LIMITED", "SUSPENDED" - `users.relationship` (object,null) Relationship with this user - `users.relationship.following` (string,null) Does the viewer follow the target? Enum: "PENDING", "ACCEPTED", "REJECTED" - `users.relationship.followed` (string,null) Does the target follow the viewer? Enum: "PENDING", "ACCEPTED", "REJECTED" - `users.relationship.blocked` (boolean,null) Viewer blocked the target - `users.relationship.blockedBy` (boolean,null) Target blocked the viewer - `users.relationship.muted` (object,null) Viewer mutes the target - `users.relationship.muted.state` (boolean) - `users.relationship.muted.expiresAt` (string,null) Example: "2022-03-10T16:15:50Z" - `users.relationship.note` (string,null) Viewer's private note about the target - `users.emojis` (array,null) - `users.emojis.shortcode` (string, required) - `users.emojis.category` (string,null) - `users.emojis.url` (string, required) - `users.emojis.staticUrl` (string, required) - `users.emojis.visibleInPicker` (boolean) - `users.location` (object,null) User's location, geo and name - `users.location.geo` (object,null) Coordinates and other geo data - `users.location.geo.latitude` (number) - `users.location.geo.longitude` (number) - `users.location.geo.altitude` (number,null) - `users.location.geo.accuracy` (number,null) - `users.location.geo.verticalAccuracy` (number,null) - `users.location.geo.speed` (number,null) - `users.location.geo.bearing` (number,null) - `users.location.geo.timestamp` (integer,null) - `users.location.autoUpdate` (boolean) - `users.location.show` (boolean) - `users.timezone` (object,null) User's timezone - `users.timezone.ianaTimezone` (string,null) - `users.birthday` (object,null) User's birthday - `users.birthday.date` (string,null) Example: "2022-03-10T16:15:50Z" - `users.software` (string, required) Software platform type (wellesley, mastodon, threads.net) Example: "wellesley" - `users.channel` (boolean) is channel user - `users.groupId` (string,null) UUID with type prefix Example: "us_01hxcvk1hjexere4pvtrj0ymqq" - `users.groupPrivacy` (string,null) * PUBLIC - Channel is visible to everyone and can be followed by anyone. * PRIVATE - Channel is visible only to group members and can only be followed by group members. Enum: "PUBLIC", "PRIVATE" - `users.groupMain` (boolean,null) - `users.groupDefault` (boolean,null) - `users.actorType` (string,null) Whether this user is a person, application or a service Enum: "Application", "Group", "Organization", "Person", "Service" - `selectedUserId` (string,null) ID of currently selected user. If not provided, the first user is selected Example: "us_01hxcvk1hjexere4pvtrj0ymqq" ## Response 403 fields (application/json): - `errorCode` (string, required) Error code - `message` (string, required) Error message - `docUrl` (string) Link to documentation ## Response 409 fields (application/json): - `errorCode` (string, required) Error code - `message` (string, required) Error message - `docUrl` (string) Link to documentation ## Response 500 fields (application/json): - `errorCode` (string, required) Error code - `message` (string, required) Error message - `docUrl` (string) Link to documentation ## Response 400 fields