Create/Import User (Human)​
Create/import a new user with the type human. The newly created user will get an initialization email if either the email address is not marked as verified or no password is set. If a password is set the user will not be requested to set a new one on the first login.
Header Parameters
The default is always the organization of the requesting user. If you like to add users to another organization include the header. Make sure the user has permission in the requested organization.
Request Body required
profile object required
email object required
phone object
hashedPassword object
If this is set to true, the user has to change the password on the next login.
If this is set to true, you will get a link for the passwordless/passkey registration in the response.
idps object[]
Request Body required
profile object required
email object required
phone object
hashedPassword object
If this is set to true, the user has to change the password on the next login.
If this is set to true, you will get a link for the passwordless/passkey registration in the response.
idps object[]
Request Body required
profile object required
email object required
phone object
hashedPassword object
If this is set to true, the user has to change the password on the next login.
If this is set to true, you will get a link for the passwordless/passkey registration in the response.
idps object[]
- 200
- default
A successful response.
Schema
details object
passwordlessRegistration object
{
"userId": "string",
"details": {
"sequence": "2",
"creationDate": "2024-03-27T10:05:50.967Z",
"changeDate": "2024-03-27T10:05:50.967Z",
"resourceOwner": "69629023906488334"
},
"passwordlessRegistration": {
"link": "string",
"lifetime": "string",
"expiration": "string"
}
}
Schema
details object
passwordlessRegistration object
{
"userId": "string",
"details": {
"sequence": "2",
"creationDate": "2024-03-27T10:05:50.967Z",
"changeDate": "2024-03-27T10:05:50.967Z",
"resourceOwner": "69629023906488334"
},
"passwordlessRegistration": {
"link": "string",
"lifetime": "string",
"expiration": "string"
}
}
Schema
details object
passwordlessRegistration object
{
"userId": "string",
"details": {
"sequence": "2",
"creationDate": "2024-03-27T10:05:50.967Z",
"changeDate": "2024-03-27T10:05:50.967Z",
"resourceOwner": "69629023906488334"
},
"passwordlessRegistration": {
"link": "string",
"lifetime": "string",
"expiration": "string"
}
}
An unexpected error response.
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
Schema
details object[]
{
"code": 0,
"message": "string",
"details": [
{
"@type": "string"
}
]
}
POST /users/human/_import
Authorization
name: OAuth2type: oauth2scopes:openid,urn:zitadel:iam:org:project:id:zitadel:aud
flows: { "authorizationCode": { "authorizationUrl": "$CUSTOM-DOMAIN/oauth/v2/authorize", "tokenUrl": "$CUSTOM-DOMAIN/oauth/v2/token", "scopes": { "openid": "openid", "urn:zitadel:iam:org:project:id:zitadel:aud": "urn:zitadel:iam:org:project:id:zitadel:aud" } } }
Request
Request
curl -L -X POST 'https://$CUSTOM-DOMAIN/management/v1/users/human/_import' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userName": "minnie-mouse",
"profile": {
"firstName": "Minnie",
"lastName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "minnie@mouse.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
},
"password": "string",
"hashedPassword": {
"value": "$2y$12$hXUrnqdq1RIIYZ2HPytIIe5lXdIvbhqrTvdPsSF7o.jFh817Z6lwm"
},
"passwordChangeRequired": true,
"requestPasswordlessRegistration": true,
"otpCode": "string",
"idps": [
{
"configId": "idp-config-id",
"externalUserId": "idp-config-id",
"displayName": "minnie.mouse@gmail.com"
}
]
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/management/v1/users/human/_import' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userName": "minnie-mouse",
"profile": {
"firstName": "Minnie",
"lastName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "minnie@mouse.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
},
"password": "string",
"hashedPassword": {
"value": "$2y$12$hXUrnqdq1RIIYZ2HPytIIe5lXdIvbhqrTvdPsSF7o.jFh817Z6lwm"
},
"passwordChangeRequired": true,
"requestPasswordlessRegistration": true,
"otpCode": "string",
"idps": [
{
"configId": "idp-config-id",
"externalUserId": "idp-config-id",
"displayName": "minnie.mouse@gmail.com"
}
]
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/management/v1/users/human/_import' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userName": "minnie-mouse",
"profile": {
"firstName": "Minnie",
"lastName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "minnie@mouse.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
},
"password": "string",
"hashedPassword": {
"value": "$2y$12$hXUrnqdq1RIIYZ2HPytIIe5lXdIvbhqrTvdPsSF7o.jFh817Z6lwm"
},
"passwordChangeRequired": true,
"requestPasswordlessRegistration": true,
"otpCode": "string",
"idps": [
{
"configId": "idp-config-id",
"externalUserId": "idp-config-id",
"displayName": "minnie.mouse@gmail.com"
}
]
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/management/v1/users/human/_import' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userName": "minnie-mouse",
"profile": {
"firstName": "Minnie",
"lastName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "minnie@mouse.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
},
"password": "string",
"hashedPassword": {
"value": "$2y$12$hXUrnqdq1RIIYZ2HPytIIe5lXdIvbhqrTvdPsSF7o.jFh817Z6lwm"
},
"passwordChangeRequired": true,
"requestPasswordlessRegistration": true,
"otpCode": "string",
"idps": [
{
"configId": "idp-config-id",
"externalUserId": "idp-config-id",
"displayName": "minnie.mouse@gmail.com"
}
]
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/management/v1/users/human/_import' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userName": "minnie-mouse",
"profile": {
"firstName": "Minnie",
"lastName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "minnie@mouse.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
},
"password": "string",
"hashedPassword": {
"value": "$2y$12$hXUrnqdq1RIIYZ2HPytIIe5lXdIvbhqrTvdPsSF7o.jFh817Z6lwm"
},
"passwordChangeRequired": true,
"requestPasswordlessRegistration": true,
"otpCode": "string",
"idps": [
{
"configId": "idp-config-id",
"externalUserId": "idp-config-id",
"displayName": "minnie.mouse@gmail.com"
}
]
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/management/v1/users/human/_import' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userName": "minnie-mouse",
"profile": {
"firstName": "Minnie",
"lastName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "minnie@mouse.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
},
"password": "string",
"hashedPassword": {
"value": "$2y$12$hXUrnqdq1RIIYZ2HPytIIe5lXdIvbhqrTvdPsSF7o.jFh817Z6lwm"
},
"passwordChangeRequired": true,
"requestPasswordlessRegistration": true,
"otpCode": "string",
"idps": [
{
"configId": "idp-config-id",
"externalUserId": "idp-config-id",
"displayName": "minnie.mouse@gmail.com"
}
]
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/management/v1/users/human/_import' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userName": "minnie-mouse",
"profile": {
"firstName": "Minnie",
"lastName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "minnie@mouse.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
},
"password": "string",
"hashedPassword": {
"value": "$2y$12$hXUrnqdq1RIIYZ2HPytIIe5lXdIvbhqrTvdPsSF7o.jFh817Z6lwm"
},
"passwordChangeRequired": true,
"requestPasswordlessRegistration": true,
"otpCode": "string",
"idps": [
{
"configId": "idp-config-id",
"externalUserId": "idp-config-id",
"displayName": "minnie.mouse@gmail.com"
}
]
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/management/v1/users/human/_import' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userName": "minnie-mouse",
"profile": {
"firstName": "Minnie",
"lastName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "minnie@mouse.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
},
"password": "string",
"hashedPassword": {
"value": "$2y$12$hXUrnqdq1RIIYZ2HPytIIe5lXdIvbhqrTvdPsSF7o.jFh817Z6lwm"
},
"passwordChangeRequired": true,
"requestPasswordlessRegistration": true,
"otpCode": "string",
"idps": [
{
"configId": "idp-config-id",
"externalUserId": "idp-config-id",
"displayName": "minnie.mouse@gmail.com"
}
]
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/management/v1/users/human/_import' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userName": "minnie-mouse",
"profile": {
"firstName": "Minnie",
"lastName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "minnie@mouse.com",
"isEmailVerified": true
},
"phone": {
"phone": "+41 71 000 00 00",
"isPhoneVerified": true
},
"password": "string",
"hashedPassword": {
"value": "$2y$12$hXUrnqdq1RIIYZ2HPytIIe5lXdIvbhqrTvdPsSF7o.jFh817Z6lwm"
},
"passwordChangeRequired": true,
"requestPasswordlessRegistration": true,
"otpCode": "string",
"idps": [
{
"configId": "idp-config-id",
"externalUserId": "idp-config-id",
"displayName": "minnie.mouse@gmail.com"
}
]
}'