Create a new User (Human) | ZITADEL Docs

Create a new User (Human)

Deprecated: Use CreateUser to create a new user.

Create/import a new user. The newly created user will get a verification email if either the email address is not marked as verified and you did not request the verification to be returned.

POST

/v2/users/human

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

hashed_password & AddHumanUserRequestpassword & AddHumanUserRequest

hashedPassword*hashed_password

userId?string|null

optionally set your own id unique for the user.

username?string|null

optionally set a unique username, if none is provided the email will be used.

organization?org_domain|org_id

profile*profile

email*is_verified & email|return_code & email|send_code & email

phone?is_verified & phone|return_code & phone|send_code & phone

metadata?array<SetMetadataEntry>

idpLinks?array<IDPLink>

totpSecret?string|null

An Implementation of RFC 6238 is used, with HMAC-SHA-1 and time-step of 30 seconds.
Currently no other options are supported, and if anything different is used the validation will fail.

password*password

userId?string|null

optionally set your own id unique for the user.

username?string|null

optionally set a unique username, if none is provided the email will be used.

organization?org_domain|org_id

profile*profile

email*is_verified & email|return_code & email|send_code & email

phone?is_verified & phone|return_code & phone|send_code & phone

metadata?array<SetMetadataEntry>

idpLinks?array<IDPLink>

totpSecret?string|null

## [Response Body](/content/docs/reference/api/user/zitadel.user.v2.UserService.AddHumanUser#response-body/index.html)

### 200  `application/json`

**cURL**

```bash
curl -X POST "https://example.com/v2/users/human" \
  -H "Content-Type: application/json" \
  -d '{
    "hashedPassword": {
      "hash": "string"
    }
  }'

200

{
  "userId": "string",
  "details": {
    "sequence": 0,
    "changeDate": "2023-01-15T01:30:15.01Z",
    "resourceOwner": "string",
    "creationDate": "2023-01-15T01:30:15.01Z"
  },
  "emailCode": "string",
  "phoneCode": "string"
}