---
title: "Create user"
method: POST
path: "/v2/partition/{partitionId}/account/{accountId}/accountuser"
tags: ["Account User"]
---

# Create user

`POST /v2/partition/{partitionId}/account/{accountId}/accountuser`

## Request

- Base URL: `https://api.alianza.com`
- URL: `https://api.alianza.com/v2/partition/{partitionId}/account/{accountId}/accountuser`
- Auth: API key in header `X-AUTH-TOKEN`
- TypeScript: <https://skmtc.dev/alianza/apis/alianza-public-api/docs/v2/partition/:partitionId/account/:accountId/accountuser/post.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `accountId` string, required
- `partitionId` string, required

## Request body

- AccountUserX
  - `partitionId` string: A partitionId identifies the business entity that this account is a part of. Refers to <a href="#/~schema/PartitionX">partition.id</a>
  - `accountId` string: ID of account, refers to <a href="#/~schema/Account">account.id</a>
  - `userId` string: Identifies a unique Account User.
  - `subDomain` string: Determines the branding which is used in the display of user emails and the portal. Must exist in the <a href="#/~operation/Partition/getAllSettings">Partition Settings</a> (type SUB-DOMAINS).
  - `username` string, required: The email address of the AccountUser.
  - `firstName` string, required
  - `lastName` string, required
  - `mustChangePassword` boolean: Indicates whether the user will be required to update their password upon login. This field cannot be set manually, only read out.
  - `languageTag` string: The localization setting that indicates the language of the user. Example: "en-US"
  - `id` string: The same value as the userId.

## Response `200`

Successful operation

- AccountUserX
  - `partitionId` string: A partitionId identifies the business entity that this account is a part of. Refers to <a href="#/~schema/PartitionX">partition.id</a>
  - `accountId` string: ID of account, refers to <a href="#/~schema/Account">account.id</a>
  - `userId` string: Identifies a unique Account User.
  - `subDomain` string: Determines the branding which is used in the display of user emails and the portal. Must exist in the <a href="#/~operation/Partition/getAllSettings">Partition Settings</a> (type SUB-DOMAINS).
  - `username` string, required: The email address of the AccountUser.
  - `firstName` string, required
  - `lastName` string, required
  - `mustChangePassword` boolean: Indicates whether the user will be required to update their password upon login. This field cannot be set manually, only read out.
  - `languageTag` string: The localization setting that indicates the language of the user. Example: "en-US"
  - `id` string: The same value as the userId.

## Other responses

- `400`: Invalid AccountUserX object
- `401`: Unauthorized
- `404`: Partition Id or Account Id not found.

---

[API](https://skmtc.dev/alianza/apis/alianza-public-api.md) - [All operations](https://skmtc.dev/alianza/apis/alianza-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/alianza/apis/alianza-public-api/revisions/7223246c352c?raw)
