Create a user (Human)​
Create/import a new user with the type human. 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.
Request Body required
Possible values: non-empty
and <= 200 characters
optionally set your own id unique for the user.
Possible values: non-empty
and <= 200 characters
optionally set a unique username, if none is provided the email will be used.
organization object
profile object required
email object required
phone object
metadata object[]
password object
hashedPassword object
idpLinks object[]
Possible values: non-empty
and <= 200 characters
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.
Request Body required
Possible values: non-empty
and <= 200 characters
optionally set your own id unique for the user.
Possible values: non-empty
and <= 200 characters
optionally set a unique username, if none is provided the email will be used.
organization object
profile object required
email object required
phone object
metadata object[]
password object
hashedPassword object
idpLinks object[]
Possible values: non-empty
and <= 200 characters
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.
Request Body required
Possible values: non-empty
and <= 200 characters
optionally set your own id unique for the user.
Possible values: non-empty
and <= 200 characters
optionally set a unique username, if none is provided the email will be used.
organization object
profile object required
email object required
phone object
metadata object[]
password object
hashedPassword object
idpLinks object[]
Possible values: non-empty
and <= 200 characters
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.
- 200
- 403
- 404
- default
OK
Schema
details object
{
"userId": "string",
"details": {
"sequence": "2",
"changeDate": "2024-06-17T09:46:04.624Z",
"resourceOwner": "69629023906488334"
},
"emailCode": "string",
"phoneCode": "string"
}
Schema
details object
{
"userId": "string",
"details": {
"sequence": "2",
"changeDate": "2024-06-17T09:46:04.624Z",
"resourceOwner": "69629023906488334"
},
"emailCode": "string",
"phoneCode": "string"
}
Schema
details object
{
"userId": "string",
"details": {
"sequence": "2",
"changeDate": "2024-06-17T09:46:04.624Z",
"resourceOwner": "69629023906488334"
},
"emailCode": "string",
"phoneCode": "string"
}
Returned when the user does not have permission to access the resource.
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"
}
]
}
Returned when the resource does not exist.
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"
}
]
}
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 /v2beta/users/human
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/v2beta/users/human' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"username": "minnie-mouse",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"phone": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
},
"metadata": [
{
"key": "my-key",
"value": "VGhpcyBpcyBteSB0ZXN0IHZhbHVl"
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"changeRequired": true
},
"hashedPassword": {
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
},
"idpLinks": [
{
"idpId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"userId": "6516849804890468048461403518",
"userName": "user@external.com"
}
],
"totpSecret": "TJOPWSDYILLHXFV4MLKNNJOWFG7VSDCK"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/users/human' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"username": "minnie-mouse",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"phone": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
},
"metadata": [
{
"key": "my-key",
"value": "VGhpcyBpcyBteSB0ZXN0IHZhbHVl"
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"changeRequired": true
},
"hashedPassword": {
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
},
"idpLinks": [
{
"idpId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"userId": "6516849804890468048461403518",
"userName": "user@external.com"
}
],
"totpSecret": "TJOPWSDYILLHXFV4MLKNNJOWFG7VSDCK"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/users/human' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"username": "minnie-mouse",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"phone": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
},
"metadata": [
{
"key": "my-key",
"value": "VGhpcyBpcyBteSB0ZXN0IHZhbHVl"
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"changeRequired": true
},
"hashedPassword": {
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
},
"idpLinks": [
{
"idpId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"userId": "6516849804890468048461403518",
"userName": "user@external.com"
}
],
"totpSecret": "TJOPWSDYILLHXFV4MLKNNJOWFG7VSDCK"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/users/human' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"username": "minnie-mouse",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"phone": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
},
"metadata": [
{
"key": "my-key",
"value": "VGhpcyBpcyBteSB0ZXN0IHZhbHVl"
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"changeRequired": true
},
"hashedPassword": {
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
},
"idpLinks": [
{
"idpId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"userId": "6516849804890468048461403518",
"userName": "user@external.com"
}
],
"totpSecret": "TJOPWSDYILLHXFV4MLKNNJOWFG7VSDCK"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/users/human' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"username": "minnie-mouse",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"phone": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
},
"metadata": [
{
"key": "my-key",
"value": "VGhpcyBpcyBteSB0ZXN0IHZhbHVl"
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"changeRequired": true
},
"hashedPassword": {
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
},
"idpLinks": [
{
"idpId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"userId": "6516849804890468048461403518",
"userName": "user@external.com"
}
],
"totpSecret": "TJOPWSDYILLHXFV4MLKNNJOWFG7VSDCK"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/users/human' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"username": "minnie-mouse",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"phone": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
},
"metadata": [
{
"key": "my-key",
"value": "VGhpcyBpcyBteSB0ZXN0IHZhbHVl"
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"changeRequired": true
},
"hashedPassword": {
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
},
"idpLinks": [
{
"idpId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"userId": "6516849804890468048461403518",
"userName": "user@external.com"
}
],
"totpSecret": "TJOPWSDYILLHXFV4MLKNNJOWFG7VSDCK"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/users/human' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"username": "minnie-mouse",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"phone": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
},
"metadata": [
{
"key": "my-key",
"value": "VGhpcyBpcyBteSB0ZXN0IHZhbHVl"
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"changeRequired": true
},
"hashedPassword": {
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
},
"idpLinks": [
{
"idpId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"userId": "6516849804890468048461403518",
"userName": "user@external.com"
}
],
"totpSecret": "TJOPWSDYILLHXFV4MLKNNJOWFG7VSDCK"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/users/human' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"username": "minnie-mouse",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"phone": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
},
"metadata": [
{
"key": "my-key",
"value": "VGhpcyBpcyBteSB0ZXN0IHZhbHVl"
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"changeRequired": true
},
"hashedPassword": {
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
},
"idpLinks": [
{
"idpId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"userId": "6516849804890468048461403518",
"userName": "user@external.com"
}
],
"totpSecret": "TJOPWSDYILLHXFV4MLKNNJOWFG7VSDCK"
}'
curl -L -X POST 'https://$CUSTOM-DOMAIN/v2beta/users/human' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
--data-raw '{
"userId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"username": "minnie-mouse",
"organization": {
"orgId": "string",
"orgDomain": "string"
},
"profile": {
"givenName": "Minnie",
"familyName": "Mouse",
"nickName": "Mini",
"displayName": "Minnie Mouse",
"preferredLanguage": "en",
"gender": "GENDER_FEMALE"
},
"email": {
"email": "mini@mouse.com",
"sendCode": {
"urlTemplate": "https://example.com/email/verify?userID={{.UserID}}&code={{.Code}}&orgID={{.OrgID}}"
},
"returnCode": {},
"isVerified": true
},
"phone": {
"phone": "+41791234567",
"sendCode": {},
"returnCode": {},
"isVerified": true
},
"metadata": [
{
"key": "my-key",
"value": "VGhpcyBpcyBteSB0ZXN0IHZhbHVl"
}
],
"password": {
"password": "Secr3tP4ssw0rd!",
"changeRequired": true
},
"hashedPassword": {
"hash": "$2a$12$lJ08fqVr8bFJilRVnDT9QeULI7YW.nT3iwUv6dyg0aCrfm3UY8XR2",
"changeRequired": true
},
"idpLinks": [
{
"idpId": "d654e6ba-70a3-48ef-a95d-37c8d8a7901a",
"userId": "6516849804890468048461403518",
"userName": "user@external.com"
}
],
"totpSecret": "TJOPWSDYILLHXFV4MLKNNJOWFG7VSDCK"
}'